mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
Allow base64 key
https://github.com/alexbelgium/hassio-addons/issues/217
This commit is contained in:
@@ -8,9 +8,11 @@
|
||||
# APP_KEY
|
||||
APP_KEY="$(bashio::config 'APP_KEY')"
|
||||
|
||||
# Check APP_KEY format
|
||||
APP_KEY_COUNT=${APP_KEY#*base64:}
|
||||
if [ ! ${#APP_KEY_COUNT} = 32 ]; then bashio::exit.nok "Your APP_KEY has ${#APP_KEY_COUNT} instead of 32 characters"; fi
|
||||
# If not base64
|
||||
if [[ ! "$APP_KEY" == *"base64"* ]]; then
|
||||
# Check APP_KEY format
|
||||
if [ ! ${#APP_KEY} = 32 ]; then bashio::exit.nok "Your APP_KEY has ${#APP_KEY} instead of 32 characters"; fi
|
||||
fi
|
||||
|
||||
# Backup APP_KEY file
|
||||
bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt"
|
||||
|
||||
Reference in New Issue
Block a user