mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-19 15:21:50 +02:00
Error message if no config.yaml in CONFIGSOURCE
This commit is contained in:
@@ -8,6 +8,10 @@
|
|||||||
|
|
||||||
# Where is the config
|
# Where is the config
|
||||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
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
|
# Check if config is located in an acceptable location
|
||||||
LOCATIONOK=""
|
LOCATIONOK=""
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
# Where is the config
|
# Where is the config
|
||||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
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"
|
DATABASESOURCE="$(dirname "${CONFIGSOURCE}")/cache.db"
|
||||||
|
|
||||||
# Make sure folder exist
|
# Make sure folder exist
|
||||||
|
|||||||
@@ -7,6 +7,10 @@
|
|||||||
|
|
||||||
# Where is the config
|
# Where is the config
|
||||||
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
|
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"
|
DATABASESOURCE="$(dirname "${CONFIGSOURCE}")/cache.db"
|
||||||
|
|
||||||
# Make sure folder exist
|
# Make sure folder exist
|
||||||
|
|||||||
Reference in New Issue
Block a user