mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-02-22 11:08:21 +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
|
||||
# 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
|
||||
# service not running, start it up
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
${SUDO} systemctl start dnsmasq
|
||||
else
|
||||
${SUDO} service dnsmasq start
|
||||
fi
|
||||
fi
|
||||
|
||||
# Start services
|
||||
|
||||
echo " done!"
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue