mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-28 09:03:17 +00:00
Changed dnsmasq restart handling to be the same as gravity.sh
This commit is contained in:
parent
4b1dd8a2a5
commit
f964aff9b0
1 changed files with 12 additions and 2 deletions
|
@ -52,6 +52,16 @@ if [[ "$combopattern" != "" ]]; then
|
|||
sed -r -i '/'"$pattern"'/d' $adList
|
||||
|
||||
echo "** $# domain(s) whitelisted."
|
||||
# Force dnsmasq to reload /etc/pihole/gravity.list
|
||||
kill -HUP $(pidof dnsmasq)
|
||||
# Reload hosts file
|
||||
echo "** Refresh lists in dnsmasq..."
|
||||
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
|
||||
if [[ $dnsmasqPid ]]; then
|
||||
# service already running - reload config
|
||||
sudo kill -HUP $dnsmasqPid
|
||||
else
|
||||
# service not running, start it up
|
||||
sudo service dnsmasq start
|
||||
fi
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue