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
23
gravity.sh
23
gravity.sh
|
@ -325,13 +325,28 @@ function gravity_reload() {
|
||||||
find "$piholeDir" -type f -exec ${SUDO} chmod 666 {} \;
|
find "$piholeDir" -type f -exec ${SUDO} chmod 666 {} \;
|
||||||
|
|
||||||
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
|
||||||
${SUDO} service dnsmasq start
|
if [ -x "$(command -v systemctl)" ]; then
|
||||||
|
${SUDO} systemctl start dnsmasq
|
||||||
|
else
|
||||||
|
${SUDO} service dnsmasq start
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Start services
|
||||||
|
|
||||||
echo " done!"
|
echo " done!"
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue