mirror of
https://github.com/pi-hole/pi-hole
synced 2024-12-23 07:18:07 +00:00
Merge pull request #798 from pi-hole/dnsmasqrestartchange
Some bug fixes before release
This commit is contained in:
commit
123b16991b
@ -168,14 +168,22 @@ Reload() {
|
||||
echo ":::"
|
||||
echo -n "::: Refresh lists in dnsmasq..."
|
||||
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
|
||||
if [[ ${dnsmasqPid} ]]; then
|
||||
# service already running - reload config
|
||||
killall -s HUP dnsmasq
|
||||
# service already running - reload config
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
systemctl restart dnsmasq
|
||||
else
|
||||
service dnsmasq restart
|
||||
fi
|
||||
else
|
||||
# service not running, start it up
|
||||
service dnsmasq start
|
||||
# service not running, start it up
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
systemctl start dnsmasq
|
||||
else
|
||||
service dnsmasq start
|
||||
fi
|
||||
fi
|
||||
echo " done!"
|
||||
}
|
||||
|
@ -185,14 +185,22 @@ Reload() {
|
||||
# Reload hosts file
|
||||
echo ":::"
|
||||
echo -n "::: Refresh lists in dnsmasq..."
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
|
||||
if [[ ${dnsmasqPid} ]]; then
|
||||
# service already running - reload config
|
||||
killall -s HUP dnsmasq
|
||||
# service already running - reload config
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
systemctl restart dnsmasq
|
||||
else
|
||||
service dnsmasq restart
|
||||
fi
|
||||
else
|
||||
# service not running, start it up
|
||||
service dnsmasq start
|
||||
# service not running, start it up
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
systemctl start dnsmasq
|
||||
else
|
||||
service dnsmasq start
|
||||
fi
|
||||
fi
|
||||
echo " done!"
|
||||
}
|
||||
|
@ -895,12 +895,12 @@ update_dialogs(){
|
||||
|
||||
if [[ $? = 0 ]];then
|
||||
case ${UpdateCmd} in
|
||||
Update)
|
||||
echo "::: Updating existing install"
|
||||
${opt1a})
|
||||
echo "::: $opt1a option selected."
|
||||
useUpdateVars=true
|
||||
;;
|
||||
Install)
|
||||
echo "::: Running complete install script"
|
||||
${opt2a})
|
||||
echo "::: $opt2a option selected"
|
||||
useUpdateVars=false
|
||||
;;
|
||||
esac
|
||||
|
21
gravity.sh
21
gravity.sh
@ -310,18 +310,25 @@ gravity_reload() {
|
||||
adList=${adList//\//\\\/}
|
||||
#Now replace the line in dnsmasq file
|
||||
sed -i "s/^addn-hosts.*/addn-hosts=$adList/" /etc/dnsmasq.d/01-pihole.conf
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
find "$piholeDir" -type f -exec chmod 666 {} \;
|
||||
|
||||
find "$piholeDir" -type f -exec chmod 666 {} \;
|
||||
dnsmasqPid=$(pidof dnsmasq)
|
||||
|
||||
if [[ ${dnsmasqPid} ]]; then
|
||||
# service already running - reload config
|
||||
killall -s HUP dnsmasq
|
||||
# service already running - reload config
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
systemctl restart dnsmasq
|
||||
else
|
||||
service dnsmasq restart
|
||||
fi
|
||||
else
|
||||
# service not running, start it up
|
||||
service dnsmasq start
|
||||
# service not running, start it up
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
systemctl start dnsmasq
|
||||
else
|
||||
service dnsmasq start
|
||||
fi
|
||||
fi
|
||||
echo " done!"
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user