mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-17 14:21:49 +02:00
checks length of API_KEY
This commit is contained in:
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"schema": {
|
"schema": {
|
||||||
"CONFIG_LOCATION": "str",
|
"CONFIG_LOCATION": "str",
|
||||||
"API_KEY": "str(32,32)",
|
"API_KEY": "str",
|
||||||
"DB_CONNECTION": "list(sqlite|mariadb_addon|remotedb)",
|
"DB_CONNECTION": "list(sqlite|mariadb_addon|remotedb)",
|
||||||
"DB_HOST": "str?",
|
"DB_HOST": "str?",
|
||||||
"DB_PORT": "str?",
|
"DB_PORT": "str?",
|
||||||
|
|||||||
@@ -4,7 +4,9 @@ bashio::log.info "Launching app"
|
|||||||
|
|
||||||
# Backup API_KEY file
|
# Backup API_KEY file
|
||||||
bashio::log.info "Backuping API_KEY to /config/addons_config/fireflyiii/API_KEY_BACKUP.txt"
|
bashio::log.info "Backuping API_KEY to /config/addons_config/fireflyiii/API_KEY_BACKUP.txt"
|
||||||
echo "$(bashio::config 'API_KEY')" >/config/addons_config/fireflyiii/API_KEY_BACKUP.txt
|
API_KEY="$(bashio::config 'API_KEY')"
|
||||||
|
echo "$API_KEY" >/config/addons_config/fireflyiii/API_KEY_BACKUP.txt
|
||||||
|
if [ ! ${#API_KEY} = 32 ]; then bashio::exit.nok "Your API_KEY has ${#API_KEY} instead of 32 characters"; fi
|
||||||
|
|
||||||
# Define database
|
# Define database
|
||||||
bashio::log.info "Defining database"
|
bashio::log.info "Defining database"
|
||||||
|
|||||||
Reference in New Issue
Block a user