Correct APP_KEY

This commit is contained in:
Alexandre
2024-12-06 16:09:02 +01:00
committed by GitHub
parent b47eccfbc7
commit d24e6a6b3a

View File

@@ -69,7 +69,7 @@ esac
APP_KEY=$(bashio::config "APP_KEY")
# Check if APP_KEY is not 32 characters long
if [ -z "$APP_KEY" ] || [ ${#APP_KEY} -ne 32 ]; then
if [ -z "$APP_KEY" ] || [ ${#APP_KEY} -lt 32 ]; then
APP_KEY="$(echo -n 'base64:'; openssl rand -base64 32)"
bashio::addon.option "APP_KEY" "${APP_KEY}"
bashio::log.warning "The APP_KEY set was invalid, generated a random one: ${APP_KEY}. Restarting to take it into account"