mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-19 05:40:13 +00:00
Change how dnsmasq is started/restarted (See issue #752)
This commit is contained in:
parent
591208b730
commit
df34f7fbac
1 changed files with 19 additions and 4 deletions
17
gravity.sh
17
gravity.sh
|
@ -326,12 +326,27 @@ function gravity_reload() {
|
||||||
|
|
||||||
if [[ ${dnsmasqPid} ]]; then
|
if [[ ${dnsmasqPid} ]]; then
|
||||||
# service already running - reload config
|
# service already running - reload config
|
||||||
${SUDO} killall -s HUP dnsmasq
|
if [ -x "$(command -v systemctl)" ]; then
|
||||||
|
${SUDO} systemctl reload dnsmasq
|
||||||
|
${SUDO} systemctl restart dnsmasq
|
||||||
|
else
|
||||||
|
${SUDO} service dnsmasq reload
|
||||||
|
${SUDO} service dnsmasq restart
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# service not running, start it up
|
# service not running, start it up
|
||||||
|
if [ -x "$(command -v systemctl)" ]; then
|
||||||
|
${SUDO} systemctl start dnsmasq
|
||||||
|
else
|
||||||
${SUDO} service dnsmasq start
|
${SUDO} service dnsmasq start
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start services
|
||||||
|
|
||||||
echo " done!"
|
echo " done!"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue