From 7083019cf622e1b30532fd32a643f9fd67a271a0 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Sat, 14 Oct 2023 20:36:40 +0200 Subject: [PATCH] Update 01-config_yaml.sh --- .templates/01-config_yaml.sh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.templates/01-config_yaml.sh b/.templates/01-config_yaml.sh index 40138ccc1..4f03de819 100644 --- a/.templates/01-config_yaml.sh +++ b/.templates/01-config_yaml.sh @@ -19,7 +19,7 @@ if bashio::config.has_value 'CONFIG_LOCATION'; then CONFIGSOURCE=$(bashio::config "CONFIG_LOCATION") # Check CONFIGSOURCE ends with config.yaml if [ "$(basename "$CONFIGSOURCE")" != "config.yaml" ]; then - bashio::log.error "Watch-out: your CONFIG_LOCATION should end by config.yaml, and instead it is $(basename "$CONFIGSOURCE")" + bashio::log.red "Watch-out: 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="" @@ -30,7 +30,7 @@ if bashio::config.has_value 'CONFIG_LOCATION'; then done if [ -z "$LOCATIONOK" ]; then CONFIGSOURCE=/config/addons_config/${HOSTNAME#*-} - bashio::log.fatal "Watch-out : your CONFIG_LOCATION values can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $CONFIGSOURCE" + bashio::log.red "Watch-out : your CONFIG_LOCATION values can only be set in /share, /config or /data (internal to addon). It will be reset to the default location : $CONFIGSOURCE" fi else @@ -47,7 +47,9 @@ chmod -R 755 "$(dirname "${CONFIGSOURCE}")" # LOAD CONFIG.YAML # #################### -bashio::log.info "Load environment variables from $CONFIGSOURCE if existing" +bashio::log.green "Load environment variables from $CONFIGSOURCE if existing" +echo "Wiki here : github.com/alexbelgium/hassio-addons/wiki/Add-ons-feature-:-customisation" +bashio::log.green "---------------------------------------------------------" # Check if config file is there, or create one from template if [ ! -f "$CONFIGSOURCE" ]; then @@ -81,7 +83,7 @@ EXIT_CODE=0 yamllint -d relaxed "$CONFIGSOURCE" &>ERROR || EXIT_CODE=$? if [ "$EXIT_CODE" != 0 ]; then cat ERROR - bashio::log.warning "... config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above." + bashio::log.yellow "... config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above." exit 1 fi @@ -151,6 +153,6 @@ while IFS= read -r line; do # Show in log if ! bashio::config.false "verbose"; then bashio::log.blue "$KEYS='$VALUE'"; fi else - bashio::log.fatal "$line does not follow the correct structure. Please check your yaml file." + bashio::log.red "$line does not follow the correct structure. Please check your yaml file." fi done <"/tmpfile"