mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-07-08 23:10:59 +02:00
Update 99-run.sh
This commit is contained in:
@@ -78,7 +78,7 @@ MC_BIN="/usr/local/bin/mc"
|
|||||||
MUSEUM_BIN="$(command -v museum || true)"
|
MUSEUM_BIN="$(command -v museum || true)"
|
||||||
[ -z "$MUSEUM_BIN" ] && [ -x /app/museum ] && MUSEUM_BIN=/app/museum
|
[ -z "$MUSEUM_BIN" ] && [ -x /app/museum ] && MUSEUM_BIN=/app/museum
|
||||||
[ -z "$MUSEUM_BIN" ] && [ -x /museum ] && MUSEUM_BIN=/museum
|
[ -z "$MUSEUM_BIN" ] && [ -x /museum ] && MUSEUM_BIN=/museum
|
||||||
[ -z "$MUSEUM_BIN" ] && MUSEUM_BIN=museum
|
[ -z "$MUSEUM_BIN" ] && MUSEUM_BIN=museum # fallback in PATH
|
||||||
|
|
||||||
WEB_PREP_BIN=/usr/local/bin/ente-web-prepare
|
WEB_PREP_BIN=/usr/local/bin/ente-web-prepare
|
||||||
WEB_NGINX_CONF=/etc/ente-web/nginx.conf
|
WEB_NGINX_CONF=/etc/ente-web/nginx.conf
|
||||||
@@ -88,11 +88,9 @@ WEB_NGINX_CONF=/etc/ente-web/nginx.conf
|
|||||||
############################################
|
############################################
|
||||||
create_config() {
|
create_config() {
|
||||||
bashio::log.info "Generating new museum config at $CFG"
|
bashio::log.info "Generating new museum config at $CFG"
|
||||||
# small helpers
|
|
||||||
_rand_b64() { head -c "$1" /dev/urandom | base64 | tr -d '\n'; }
|
_rand_b64() { head -c "$1" /dev/urandom | base64 | tr -d '\n'; }
|
||||||
_rand_b64url() { head -c "$1" /dev/urandom | base64 | tr '+/' '-_' | tr -d '\n'; }
|
_rand_b64url() { head -c "$1" /dev/urandom | base64 | tr '+/' '-_' | tr -d '\n'; }
|
||||||
|
|
||||||
# Write minimal functional YAML; you can expand if you ship a richer template.
|
|
||||||
cat >"$CFG" <<EOF
|
cat >"$CFG" <<EOF
|
||||||
key:
|
key:
|
||||||
encryption: $(_rand_b64 32)
|
encryption: $(_rand_b64 32)
|
||||||
@@ -164,7 +162,6 @@ bootstrap_internal_db() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
bashio::log.info "Ensuring role & database exist..."
|
bashio::log.info "Ensuring role & database exist..."
|
||||||
|
|
||||||
local esc_pass="${DB_PASS//\'/\'\'}"
|
local esc_pass="${DB_PASS//\'/\'\'}"
|
||||||
|
|
||||||
# role
|
# role
|
||||||
@@ -235,7 +232,7 @@ start_web() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
bashio::log.info "Starting Ente web (nginx, ports 3000‑3004)..."
|
bashio::log.info "Starting Ente web (nginx, ports 3000‑3004)..."
|
||||||
nginx -c "$WEB_NGINX_CONF" -g 'daemon off;' &
|
nginx -c "$WEB_NGINX_CONF" -g 'daemon off;' &
|
||||||
WEB_PID=$!
|
WEB_PID=$!
|
||||||
}
|
}
|
||||||
@@ -290,5 +287,5 @@ wait_minio_ready_and_bucket
|
|||||||
|
|
||||||
start_web
|
start_web
|
||||||
|
|
||||||
# Foreground (keeps container alive)
|
# Foreground — keeps container alive
|
||||||
start_museum_foreground
|
start_museum_foreground
|
||||||
|
|||||||
Reference in New Issue
Block a user