From 20e0a314ca3642c5446585733d0888a78818c15a Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 2 Dec 2021 13:49:10 +0100 Subject: [PATCH] Update 99-run.sh --- gazpar2mqtt/rootfs/scripts/99-run.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gazpar2mqtt/rootfs/scripts/99-run.sh b/gazpar2mqtt/rootfs/scripts/99-run.sh index 8c4f12c5c..9b98ff26a 100644 --- a/gazpar2mqtt/rootfs/scripts/99-run.sh +++ b/gazpar2mqtt/rootfs/scripts/99-run.sh @@ -42,7 +42,6 @@ echo "Symlink created" # Export all yaml entries as env variables # Helper function -set +u function parse_yaml { local prefix=$2 || local prefix="" local s='[[:space:]]*' w='[a-zA-Z0-9_]*' fs=$(echo @ | tr @ '\034') @@ -65,7 +64,7 @@ function parse_yaml { # Get variables and export bashio::log.info "Starting the app with the variables in /config/gazpar2mqtt" # Get list of parameters in a file -eval parse_yaml "$CONFIGSOURCE" "" >/tmpfile +(eval parse_yaml "$CONFIGSOURCE" "") >/tmpfile while IFS= read -r line do # Clean output @@ -75,7 +74,7 @@ do secret=${word#*secret } echo "secret : $secret" # Extract value from secrets file - eval parse_yaml "/config/secrets.yaml" "" >/secrettmp + (eval parse_yaml "/config/secrets.yaml" "") >/secrettmp secret=$(sed "/$secret/!d" /secrettmp) echo "secret : $secret" secret=${secret#*=}