mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-22 23:08:07 +00:00
Merge pull request #2169 from pi-hole/tweak/customportsDNS
Remove LOCAL_DNS_PORT support
This commit is contained in:
commit
b1ab7f46e0
@ -149,9 +149,13 @@ ProcessDNSSettings() {
|
|||||||
let COUNTER=COUNTER+1
|
let COUNTER=COUNTER+1
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -z "${LOCAL_DNS_PORT}" ]; then
|
# The option LOCAL_DNS_PORT is deprecated
|
||||||
add_dnsmasq_setting "server" "127.0.0.1#${LOCAL_DNS_PORT}"
|
# We apply it once more, and then convert it into the current format
|
||||||
fi
|
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"
|
delete_dnsmasq_setting "domain-needed"
|
||||||
|
|
||||||
@ -529,16 +533,6 @@ SetPrivacyLevel() {
|
|||||||
changeFTLsetting "PRIVACYLEVEL" "${args[2]}"
|
changeFTLsetting "PRIVACYLEVEL" "${args[2]}"
|
||||||
fi
|
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() {
|
main() {
|
||||||
args=("$@")
|
args=("$@")
|
||||||
@ -570,7 +564,6 @@ main() {
|
|||||||
"adlist" ) CustomizeAdLists;;
|
"adlist" ) CustomizeAdLists;;
|
||||||
"audit" ) audit;;
|
"audit" ) audit;;
|
||||||
"-l" | "privacylevel" ) SetPrivacyLevel;;
|
"-l" | "privacylevel" ) SetPrivacyLevel;;
|
||||||
"localdnsport" ) SetLocalDNSport "$3";;
|
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user