From db941f232c5805cfe5968cc1107b51795c10e769 Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Tue, 9 Jan 2024 11:47:45 +0100 Subject: [PATCH] Update 00-global_var.sh --- .templates/00-global_var.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.templates/00-global_var.sh b/.templates/00-global_var.sh index f4a808bf4..3ac9af9f8 100755 --- a/.templates/00-global_var.sh +++ b/.templates/00-global_var.sh @@ -33,9 +33,12 @@ for KEYS in "${arr[@]}"; do VALUE="${VALUE//[\"\']/}" line="${KEYS}='${VALUE}'" # Check if secret - if [[ "${line}" == *'!secret '* ]]; then + if [[ "${line}" == *"!secret "* ]]; then echo "secret detected" + # Get argument secret=${line#*secret } + # Remove trailing ' or " + secret="${secret%[\"\']}" # Stop if secret file not mounted if [[ "$SECRETSOURCE" == "false" ]]; then bashio::log.warning "Homeassistant config not mounted, secrets are not supported"