mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-24 08:16:04 +02: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
|
||||||
APP_KEY="$(bashio::config 'APP_KEY')"
|
APP_KEY="$(bashio::config 'APP_KEY')"
|
||||||
|
|
||||||
# Check APP_KEY format
|
# If not base64
|
||||||
APP_KEY_COUNT=${APP_KEY#*base64:}
|
if [[ ! "$APP_KEY" == *"base64"* ]]; then
|
||||||
if [ ! ${#APP_KEY_COUNT} = 32 ]; then bashio::exit.nok "Your APP_KEY has ${#APP_KEY_COUNT} instead of 32 characters"; fi
|
# 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
|
# Backup APP_KEY file
|
||||||
bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt"
|
bashio::log.info "Backuping APP_KEY to /config/addons_config/fireflyiii/APP_KEY_BACKUP.txt"
|
||||||
|
|||||||
Reference in New Issue
Block a user