mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Update 01-config_yaml.sh
This commit is contained in:
@@ -19,9 +19,11 @@ slug="${HOSTNAME#*-}"
|
|||||||
if [ ! -f /config/configuration.yaml ] && [ ! -f /config/configuration.json ]; then
|
if [ ! -f /config/configuration.yaml ] && [ ! -f /config/configuration.json ]; then
|
||||||
# New config location
|
# New config location
|
||||||
CONFIGLOCATION="/config"
|
CONFIGLOCATION="/config"
|
||||||
|
CONFIGFILEBROWSER="/addon_configs/*-$slug/config.yaml"
|
||||||
else
|
else
|
||||||
# Legacy config location
|
# Legacy config location
|
||||||
CONFIGLOCATION="/config/addons_config/${slug}"
|
CONFIGLOCATION="/config/addons_config/${slug}"
|
||||||
|
CONFIGFILEBROWSER="/homeassistant/addons_config/$slug/config.yaml"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Default location
|
# Default location
|
||||||
@@ -79,6 +81,11 @@ fi
|
|||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
bashio::log.green "Load environment variables from $CONFIGSOURCE if existing"
|
bashio::log.green "Load environment variables from $CONFIGSOURCE if existing"
|
||||||
|
if [[ "$CONFIGSOURCE" == "/config"* ; then
|
||||||
|
bashio::log.green "If accessing the file with filebrowser it should be mapped to $CONFIGFILEBROWSER"
|
||||||
|
else
|
||||||
|
bashio::log.green "If accessing the file with filebrowser it should be mapped to $CONFIGSOURCE"
|
||||||
|
fi
|
||||||
bashio::log.green "---------------------------------------------------------"
|
bashio::log.green "---------------------------------------------------------"
|
||||||
bashio::log.green "Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables"
|
bashio::log.green "Wiki here on how to use : github.com/alexbelgium/hassio-addons/wiki/Add‐ons-feature-:-add-env-variables"
|
||||||
echo ""
|
echo ""
|
||||||
|
|||||||
Reference in New Issue
Block a user