mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 10:21:02 +01:00
Refactor allow_signup unset logic and cleanup
Refactor allow_signup handling and cleanup commands
This commit is contained in:
@@ -75,15 +75,6 @@ for SCRIPTS in /etc/cont-init.d/*; do
|
||||
sed -i '1a exit 0' "$SCRIPTS"
|
||||
done
|
||||
|
||||
rm /.env || true
|
||||
rm /env.py || true
|
||||
|
||||
# Unset allow_signup
|
||||
|
||||
if [[ "${ALLOW_SIGNUP:-}" == "false" ]]; then
|
||||
unset ALLOW_SIGNUP
|
||||
fi
|
||||
|
||||
####################
|
||||
# MIGRATE DATA DIR #
|
||||
####################
|
||||
@@ -127,6 +118,13 @@ if bashio::config.has_value "FORWARDED_ALLOW_IPS"; then
|
||||
bashio::log.info "Configured FORWARDED_ALLOW_IPS for Gunicorn"
|
||||
fi
|
||||
|
||||
# Unset allow_signup
|
||||
|
||||
if bashio::config.false "ALLOW_SIGNUP"; then
|
||||
echo "ALLOW_SIGNUP is deactivated"
|
||||
unset ALLOW_SIGNUP
|
||||
fi
|
||||
|
||||
bashio::log.info "Starting nginx"
|
||||
nginx & true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user