Reintroduce ability to set web password from using docker secrets.

Works exactly as it did in v5

Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
Adam Warner
2025-02-23 18:50:38 +00:00
parent 70d8e10f38
commit 9d55d91132
2 changed files with 6 additions and 0 deletions

View File

@@ -189,6 +189,11 @@ migrate_v5_configs() {
}
setup_web_password() {
if [ -z "${FTLCONF_webserver_api_password+x}" ] && [ -n ${WEBPASSWORD_FILE} ] && [ -r ${WEBPASSWORD_FILE} ]; then
echo " [i] Setting FTLCONF_webserver_api_password from file"
export FTLCONF_webserver_api_password=$(<"${WEBPASSWORD_FILE}")
fi
# If FTLCONF_webserver_api_password is not set
if [ -z "${FTLCONF_webserver_api_password+x}" ]; then
# Is this already set to something other than blank (default) in FTL's config file? (maybe in a volume mount)