From 0bbdd150733e74e2d76e2e80ad1ec59cc8a90b6e Mon Sep 17 00:00:00 2001 From: Adam Warner Date: Mon, 29 Aug 2022 17:12:58 +0100 Subject: [PATCH] Set FTL/DNSMASQ listening behaviour per variable if it is passed. Fixes #1188 Signed-off-by: Adam Warner --- src/s6/debian-root/usr/local/bin/_startup.sh | 1 + src/s6/debian-root/usr/local/bin/bash_functions.sh | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/src/s6/debian-root/usr/local/bin/_startup.sh b/src/s6/debian-root/usr/local/bin/_startup.sh index 520a162..ff60bf2 100755 --- a/src/s6/debian-root/usr/local/bin/_startup.sh +++ b/src/s6/debian-root/usr/local/bin/_startup.sh @@ -53,6 +53,7 @@ setup_FTL_upstream_DNS apply_FTL_Configs_From_Env setup_FTL_User setup_FTL_Interface +setup_FTL_ListeningBehaviour setup_FTL_CacheSize setup_FTL_query_logging setup_FTL_server || true 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 25681d3..a813ad6 100644 --- a/src/s6/debian-root/usr/local/bin/bash_functions.sh +++ b/src/s6/debian-root/usr/local/bin/bash_functions.sh @@ -171,6 +171,12 @@ setup_FTL_Interface(){ change_setting "PIHOLE_INTERFACE" "${interface}" } +setup_FTL_ListeningBehaviour(){ + if [ -n "$DNSMASQ_LISTENING" ]; then + change_setting "DNSMASQ_LISTENING" "${DNSMASQ_LISTENING}" + fi; +} + setup_FTL_CacheSize() { local warning=" [i] WARNING: CUSTOM_CACHE_SIZE not used" local dnsmasq_pihole_01_location="/etc/dnsmasq.d/01-pihole.conf"