Allow for empty strings to be passed into FTLCONF_ environment variables.
Signed-off-by: Adam Warner <me@adamwarner.co.uk>
This commit is contained in:
parent
637ce654c5
commit
7efb80f988
|
@ -206,7 +206,7 @@ apply_FTL_Configs_From_Env(){
|
||||||
# Get all exported environment variables starting with FTLCONF_ as a prefix and call the changeFTLsetting
|
# 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
|
# 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/
|
# 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
|
do
|
||||||
echo " [i] Applying pihole-FTL.conf setting $name=$value"
|
echo " [i] Applying pihole-FTL.conf setting $name=$value"
|
||||||
changeFTLsetting "$name" "$value"
|
changeFTLsetting "$name" "$value"
|
||||||
|
|
Loading…
Reference in New Issue