Update 01-config_yaml.sh

This commit is contained in:
Alexandre
2024-12-05 17:51:16 +01:00
committed by GitHub
parent 8d5c4b1cec
commit 64b6755ee7

View File

@@ -35,6 +35,9 @@ CONFIGSOURCE="$CONFIGLOCATION"/config.yaml
if bashio::config.has_value 'CONFIG_LOCATION'; then
CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION")
if [[ "$CONFIGSOURCE" == *.* ]]; then
CONFIGSOURCE=$(dirname "$CONFIGSOURCE")
fi
# If does not end by config.yaml, remove trailing slash and add config.yaml
if [[ "$CONFIGSOURCE" != *".yaml" ]]; then
CONFIGSOURCE="${CONFIGSOURCE%/}"/config.yaml