Update 99-run.sh

This commit is contained in:
Alexandre
2025-07-20 16:42:11 +02:00
committed by GitHub
parent af9492ad2b
commit 50117c8219

View File

@@ -78,7 +78,7 @@ MC_BIN="/usr/local/bin/mc"
MUSEUM_BIN="$(command -v museum || true)"
[ -z "$MUSEUM_BIN" ] && [ -x /app/museum ] && MUSEUM_BIN=/app/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_NGINX_CONF=/etc/ente-web/nginx.conf
@@ -88,11 +88,9 @@ WEB_NGINX_CONF=/etc/ente-web/nginx.conf
############################################
create_config() {
bashio::log.info "Generating new museum config at $CFG"
# small helpers
_rand_b64() { head -c "$1" /dev/urandom | base64 | 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
key:
encryption: $(_rand_b64 32)
@@ -164,7 +162,6 @@ bootstrap_internal_db() {
fi
bashio::log.info "Ensuring role & database exist..."
local esc_pass="${DB_PASS//\'/\'\'}"
# role
@@ -235,7 +232,7 @@ start_web() {
return 1
fi
bashio::log.info "Starting Ente web (nginx, ports 30003004)..."
bashio::log.info "Starting Ente web (nginx, ports 30003004)..."
nginx -c "$WEB_NGINX_CONF" -g 'daemon off;' &
WEB_PID=$!
}
@@ -290,5 +287,5 @@ wait_minio_ready_and_bucket
start_web
# Foreground (keeps container alive)
# Foreground keeps container alive
start_museum_foreground