mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-11 18:11:29 +02:00
Update 99-run.sh
This commit is contained in:
@@ -35,8 +35,7 @@ fi
|
|||||||
# Check if the secret key is defined in addon options
|
# Check if the secret key is defined in addon options
|
||||||
if bashio::config.has_value "GRAMPSWEB_SECRET_KEY"; then
|
if bashio::config.has_value "GRAMPSWEB_SECRET_KEY"; then
|
||||||
bashio::log.warning "Using the secret key defined in the addon options."
|
bashio::log.warning "Using the secret key defined in the addon options."
|
||||||
export SECRET_KEY="$(bashio::config "GRAMPSWEB_SECRET_KEY")"
|
export GRAMPSWEB_SECRET_KEY="$(bashio::config "GRAMPSWEB_SECRET_KEY")"
|
||||||
export GRAMPSWEB_SECRET_KEY="$SECRET_KEY"
|
|
||||||
else
|
else
|
||||||
# Check if the secret file exists; if not, create a new one
|
# Check if the secret file exists; if not, create a new one
|
||||||
if [ ! -s /config/secret/secret ]; then
|
if [ ! -s /config/secret/secret ]; then
|
||||||
@@ -47,9 +46,8 @@ else
|
|||||||
fi
|
fi
|
||||||
bashio::log.warning "Using existing secret key from /config/secret/secret."
|
bashio::log.warning "Using existing secret key from /config/secret/secret."
|
||||||
bashio::log.warning "Secret key saved to addon options."
|
bashio::log.warning "Secret key saved to addon options."
|
||||||
export SECRET_KEY="$(cat /config/secret/secret)"
|
export GRAMPSWEB_SECRET_KEY="$(cat /config/secret/secret)"
|
||||||
bashio::addon.option "GRAMPSWEB_SECRET_KEY" "$SECRET_KEY"
|
bashio::addon.option "GRAMPSWEB_SECRET_KEY" "$GRAMPSWEB_SECRET_KEY"
|
||||||
export GRAMPSWEB_SECRET_KEY="$SECRET_KEY"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##################
|
##################
|
||||||
@@ -78,7 +76,7 @@ CELERY_PID=$!
|
|||||||
# Staring nginx #
|
# Staring nginx #
|
||||||
#################
|
#################
|
||||||
echo "Starting nginx..."
|
echo "Starting nginx..."
|
||||||
exec nginx & bashio::log.info "Starting nginx"
|
#exec nginx & bashio::log.info "Starting nginx"
|
||||||
NGINX_PID=$!
|
NGINX_PID=$!
|
||||||
|
|
||||||
# Wait for all background processes
|
# Wait for all background processes
|
||||||
|
|||||||
Reference in New Issue
Block a user