From fd1eb5ad83a5b4d25d57d8de1d09d25316422f42 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Mon, 7 Jul 2025 07:59:45 +0200 Subject: [PATCH] Update 01-config_yaml.sh --- .templates/01-config_yaml.sh | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/.templates/01-config_yaml.sh b/.templates/01-config_yaml.sh index 63b96eb7d..2a0415271 100644 --- a/.templates/01-config_yaml.sh +++ b/.templates/01-config_yaml.sh @@ -120,22 +120,17 @@ if [ ! -s /tempenv ]; then bashio::log.green "... no env variables found, exiting" exit 0 fi -rm /tempenv # Check if yaml is valid EXIT_CODE=0 -yamllint -d relaxed "$CONFIGSOURCE" &>ERROR || EXIT_CODE=$? +yamllint -d relaxed /tempenv &>ERROR || EXIT_CODE=$? if [ "$EXIT_CODE" != 0 ]; then cat ERROR bashio::log.yellow "... config file has an invalid yaml format. Please check the file in $CONFIGSOURCE. Errors list above." fi -# Get list of parameters in a file -cp "$CONFIGSOURCE" /tmpfile -# Remove comments -sed -Ei 's/\s*#.*$//' /tmpfile # converts yaml to variables -sed -i 's/: /=/' /tmpfile +sed -i 's/: /=/' /tempenv # Look where secrets.yaml is located SECRETSFILE="/config/secrets.yaml" @@ -188,4 +183,5 @@ while IFS= read -r line; do else bashio::log.red "$line does not follow the correct structure. Please check your yaml file." fi -done <"/tmpfile" +done <"/tempenv" +rm /tempenv