mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-02-21 10:46:49 +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 {} \;
|
||||
|
||||
if [[ ${dnsmasqPid} ]]; then
|
||||
# service already running - reload config
|
||||
${SUDO} killall -s HUP dnsmasq
|
||||
# service already running - reload config
|
||||
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
|
||||
${SUDO} service dnsmasq start
|
||||
# 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