From 7efb80f988ea0a7eb21723bce938007c8fc1442b Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Fri, 20 Jan 2023 18:22:32 +0000 Subject: [PATCH] Allow for empty strings to be passed into FTLCONF_ environment variables. Signed-off-by: Adam Warner --- src/s6/debian-root/usr/local/bin/bash_functions.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s6/debian-root/usr/local/bin/bash_functions.sh b/src/s6/debian-root/usr/local/bin/bash_functions.sh index 9098c9d..955842f 100644 --- a/src/s6/debian-root/usr/local/bin/bash_functions.sh +++ b/src/s6/debian-root/usr/local/bin/bash_functions.sh @@ -206,7 +206,7 @@ apply_FTL_Configs_From_Env(){ # Get all exported environment variables starting with FTLCONF_ as a prefix and call the changeFTLsetting # function with the environment variable's suffix as the key. This allows applying any pihole-FTL.conf # setting defined here: https://docs.pi-hole.net/ftldns/configfile/ - declare -px | grep FTLCONF_ | sed -E 's/declare -x FTLCONF_([^=]+)=\"(.+)\"/\1 \2/' | while read -r name value + declare -px | grep FTLCONF_ | sed -E 's/declare -x FTLCONF_([^=]+)=\"(|.+)\"/\1 \2/' | while read -r name value do echo " [i] Applying pihole-FTL.conf setting $name=$value" changeFTLsetting "$name" "$value"