From 2ef76d5e3152c4b35e639c3659c74befc68bc7ed Mon Sep 17 00:00:00 2001 From: DL6ER Date: Fri, 4 May 2018 22:19:39 +0200 Subject: [PATCH] Remove LOCAL_DNS_PORT support Signed-off-by: DL6ER --- advanced/Scripts/webpage.sh | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/advanced/Scripts/webpage.sh b/advanced/Scripts/webpage.sh index 21623eea..8a85839f 100755 --- a/advanced/Scripts/webpage.sh +++ b/advanced/Scripts/webpage.sh @@ -149,9 +149,13 @@ ProcessDNSSettings() { let COUNTER=COUNTER+1 done - if [ ! -z "${LOCAL_DNS_PORT}" ]; then - add_dnsmasq_setting "server" "127.0.0.1#${LOCAL_DNS_PORT}" - fi + # The option LOCAL_DNS_PORT is deprecated + # We apply it once more, and then convert it into the current format + if [ ! -z "${LOCAL_DNS_PORT}" ]; then + add_dnsmasq_setting "server" "127.0.0.1#${LOCAL_DNS_PORT}" + add_setting "PIHOLE_DNS_${COUNTER}" "127.0.0.1#${LOCAL_DNS_PORT}" + delete_setting "LOCAL_DNS_PORT" + fi delete_dnsmasq_setting "domain-needed" @@ -529,16 +533,6 @@ SetPrivacyLevel() { changeFTLsetting "PRIVACYLEVEL" "${args[2]}" fi } -SetLocalDNSport() { - # Ensure port is a natural number { 0, 1, 2, 3, ... } - if [[ "${1}" == "0" ]]; then - delete_setting "LOCAL_DNS_PORT" - ProcessDNSSettings - elif [[ "${1}" =~ ^[0-9]+$ ]]; then - change_setting "LOCAL_DNS_PORT" "${1}" - ProcessDNSSettings - fi -} main() { args=("$@") @@ -570,7 +564,6 @@ main() { "adlist" ) CustomizeAdLists;; "audit" ) audit;; "-l" | "privacylevel" ) SetPrivacyLevel;; - "localdnsport" ) SetLocalDNSport "$3";; * ) helpFunc;; esac