Error message if no config.yaml in CONFIGSOURCE

This commit is contained in:
Alexandre
2023-01-30 14:57:52 +01:00
parent 3262be1360
commit 30c19b443a
3 changed files with 12 additions and 0 deletions

View File

@@ -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=""

View File

@@ -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

View File

@@ -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