mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-16 04:19:07 +00:00
Actually apply new setting by restarting dnsmasq
This commit is contained in:
parent
01273124ea
commit
b74862bfc5
1 changed files with 8 additions and 3 deletions
|
@ -392,15 +392,20 @@ SetListeningMode(){
|
||||||
|
|
||||||
if [[ "${args[2]}" == "all" ]] ; then
|
if [[ "${args[2]}" == "all" ]] ; then
|
||||||
echo "Listening on all interfaces, permiting all origins, hope you have a firewall!"
|
echo "Listening on all interfaces, permiting all origins, hope you have a firewall!"
|
||||||
change_setting "DNSMASQ_LISTENING" "allinterfaces"
|
change_setting "DNSMASQ_LISTENING" "all"
|
||||||
elif [[ "${args[2]}" == "single" ]] ; then
|
elif [[ "${args[2]}" == "single" ]] ; then
|
||||||
echo "Listening only on interface ${PIHOLE_INTERFACE}"
|
echo "Listening only on interface ${PIHOLE_INTERFACE}"
|
||||||
change_setting "DNSMASQ_LISTENING" "gravityinterface"
|
change_setting "DNSMASQ_LISTENING" "single"
|
||||||
else
|
else
|
||||||
echo "Listening on all interfaces, permitting only origins that are at most one hop away (local devices)"
|
echo "Listening on all interfaces, permitting only origins that are at most one hop away (local devices)"
|
||||||
change_setting "DNSMASQ_LISTENING" "localsubnets"
|
change_setting "DNSMASQ_LISTENING" "local"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ProcessDNSSettings
|
||||||
|
|
||||||
|
# Restart dnsmasq to load new configuration
|
||||||
|
RestartDNS
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue