mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
Error message if no config.yaml in CONFIGSOURCE
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
|
||||
# Where is the config
|
||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
||||
# Check CONFIGSOURCE ends with config.yaml
|
||||
if [ "$(basename "$CONFIGSOURCE")" != "config.yaml" ]; then
|
||||
bashio::log.error "Watchout: your CONFIG_LOCATION should end by config.yaml, and instead it is $(basename "$CONFIGSOURCE")"
|
||||
fi
|
||||
|
||||
# Check if config is located in an acceptable location
|
||||
LOCATIONOK=""
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
# Where is the config
|
||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
||||
# Check CONFIGSOURCE ends with config.yaml
|
||||
if [ "$(basename "$CONFIGSOURCE")" != "config.yaml" ]; then
|
||||
bashio::log.error "Watchout: your CONFIG_LOCATION should end by config.yaml, and instead it is $(basename "$CONFIGSOURCE")"
|
||||
fi
|
||||
DATABASESOURCE="$(dirname "${CONFIGSOURCE}")/cache.db"
|
||||
|
||||
# Make sure folder exist
|
||||
|
||||
@@ -7,6 +7,10 @@
|
||||
|
||||
# Where is the config
|
||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
||||
# Check CONFIGSOURCE ends with config.yaml
|
||||
if [ "$(basename "$CONFIGSOURCE")" != "config.yaml" ]; then
|
||||
bashio::log.error "Watchout: your CONFIG_LOCATION should end by config.yaml, and instead it is $(basename "$CONFIGSOURCE")"
|
||||
fi
|
||||
DATABASESOURCE="$(dirname "${CONFIGSOURCE}")/cache.db"
|
||||
|
||||
# Make sure folder exist
|
||||
|
||||
Reference in New Issue
Block a user