From ffc91d27e658c657b66a6771829a496603413a1d Mon Sep 17 00:00:00 2001 From: Alexandre <44178713+alexbelgium@users.noreply.github.com> Date: Thu, 2 Dec 2021 14:43:33 +0100 Subject: [PATCH] Update 99-run.sh --- gazpar2mqtt/rootfs/scripts/99-run.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gazpar2mqtt/rootfs/scripts/99-run.sh b/gazpar2mqtt/rootfs/scripts/99-run.sh index 66410f323..27c2cfcfd 100644 --- a/gazpar2mqtt/rootfs/scripts/99-run.sh +++ b/gazpar2mqtt/rootfs/scripts/99-run.sh @@ -71,10 +71,16 @@ do line=${line//[\"\']/} # Check if secret if [[ "${line}" == *'!secret '* ]]; then + echo "secret detected" secret=${line#*secret } + echo $secret secret=$(sed "/$secret/!d" /config/secrets.yaml) + echo $secret secret=${secret#*: } + echo $secret line="${line%%=*}=$secret" + echo $line + echo "end of secret script" fi # Data validation if [[ $line =~ ^.+[=].+$ ]]; then