1
0
mirror of https://github.com/pi-hole/pi-hole synced 2024-12-23 07:18:07 +00:00

Merge pull request #143 from iblamefish/master

fixes #142 kill -HUP erroring on gravity_reload if dnsmasq is not running
This commit is contained in:
Jacob Salmela 2016-01-01 18:16:35 -06:00
commit ab1352b48e

View File

@ -243,9 +243,17 @@ function gravity_advanced() {
function gravity_reload() { function gravity_reload() {
# Reload hosts file # Reload hosts file
echo "** Refresh lists in dnsmasq..." echo "** Refresh lists in dnsmasq..."
sudo kill -HUP $(pidof 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
} }
gravity_collapse gravity_collapse