mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-27 02:44:05 +02: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"
|
sed -i '1a exit 0' "$SCRIPTS"
|
||||||
done
|
done
|
||||||
|
|
||||||
rm /.env || true
|
|
||||||
rm /env.py || true
|
|
||||||
|
|
||||||
# Unset allow_signup
|
|
||||||
|
|
||||||
if [[ "${ALLOW_SIGNUP:-}" == "false" ]]; then
|
|
||||||
unset ALLOW_SIGNUP
|
|
||||||
fi
|
|
||||||
|
|
||||||
####################
|
####################
|
||||||
# MIGRATE DATA DIR #
|
# 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"
|
bashio::log.info "Configured FORWARDED_ALLOW_IPS for Gunicorn"
|
||||||
fi
|
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"
|
bashio::log.info "Starting nginx"
|
||||||
nginx & true
|
nginx & true
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user