mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-10 18:01:03 +01:00
update
This commit is contained in:
@@ -77,7 +77,7 @@
|
||||
"startup": "services",
|
||||
"udev": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons",
|
||||
"version": "1.0.0test4",
|
||||
"version": "1.0.0test5",
|
||||
"video": true,
|
||||
"webui": "http://[HOST]:[PORT:3000]"
|
||||
}
|
||||
|
||||
@@ -63,3 +63,22 @@ SQL
|
||||
bashio::log.info "Internal Postgres ready."
|
||||
|
||||
done
|
||||
|
||||
#################
|
||||
# Minio startup #
|
||||
#################
|
||||
|
||||
MINIO_USER="$(bashio::config 'MINIO_ROOT_USER')"
|
||||
MINIO_PASS="$(bashio::config 'MINIO_ROOT_PASSWORD')"
|
||||
S3_BUCKET="$(bashio::config 'S3_BUCKET')"
|
||||
|
||||
bashio::log.info "Waiting for MinIO API…"
|
||||
until /usr/local/bin/mc alias set h0 http://localhost:3200 "${MINIO_USER}" "${MINIO_PASS}" 2>/dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
bashio::log.info "Ensuring bucket ${S3_BUCKET} exists…"
|
||||
/usr/local/bin/mc mb -p "h0/${S3_BUCKET}" || true
|
||||
bashio::log.info "MinIO bucket ready."
|
||||
|
||||
sleep infinity
|
||||
27
ente/rootfs/etc/services.d/02-museum/run
Normal file
27
ente/rootfs/etc/services.d/02-museum/run
Normal file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
set -euo pipefail
|
||||
|
||||
CFG=/config/museum.yaml
|
||||
if ! bashio::fs.file_exists "$CFG"; then
|
||||
bashio::log.error "$CFG not found; aborting museum start."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if bashio::config.true 'USE_EXTERNAL_DB'; then
|
||||
DB_HOST="$(bashio::config 'DB_HOSTNAME')"
|
||||
DB_PORT="$(bashio::config 'DB_PORT')"
|
||||
DB_USER="$(bashio::config 'DB_USERNAME')"
|
||||
bashio::log.info "Waiting for external Postgres at ${DB_HOST}:${DB_PORT}…"
|
||||
until pg_isready -q -h "${DB_HOST}" -p "${DB_PORT}" -U "${DB_USER}"; do
|
||||
sleep 2
|
||||
done
|
||||
else
|
||||
DB_USER="postgres"
|
||||
bashio::log.info "Waiting for internal Postgres…"
|
||||
until pg_isready -q -h localhost -p 5432 -U "${DB_USER}"; do
|
||||
sleep 2
|
||||
done
|
||||
fi
|
||||
|
||||
bashio::log.info "Starting museum."
|
||||
exec /usr/bin/museum --config "$CFG"
|
||||
8
ente/rootfs/etc/services.d/03-web/run
Normal file
8
ente/rootfs/etc/services.d/03-web/run
Normal file
@@ -0,0 +1,8 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
set -euo pipefail
|
||||
if bashio::config.true 'DISABLE_WEB_UI'; then
|
||||
bashio::log.info "Web UI disabled by option."
|
||||
exit 0
|
||||
fi
|
||||
bashio::log.info "Starting Ente web."
|
||||
exec /usr/bin/ente-web
|
||||
Reference in New Issue
Block a user