mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 02:42:58 +00:00
Allow force-reload to be used when restarting DNS
* Remove duplicate coltable variable definition and source * Minor comment modifications * Add "$2" to restartdns
This commit is contained in:
parent
a5c4ae955a
commit
4d39ab9753
1 changed files with 4 additions and 7 deletions
11
pihole
11
pihole
|
@ -12,10 +12,6 @@
|
|||
readonly PI_HOLE_SCRIPT_DIR="/opt/pihole"
|
||||
readonly wildcardlist="/etc/dnsmasq.d/03-pihole-wildcard.conf"
|
||||
readonly colfile="${PI_HOLE_SCRIPT_DIR}/COL_TABLE"
|
||||
|
||||
source ${colfile}
|
||||
|
||||
colfile="${PI_HOLE_SCRIPT_DIR}/COL_TABLE"
|
||||
source "${colfile}"
|
||||
|
||||
# Must be root to use this tool
|
||||
|
@ -354,8 +350,9 @@ restartDNS() {
|
|||
local svcOption svc str output status
|
||||
svcOption="${1:-}"
|
||||
|
||||
# Determine if we should reload or restart dnsmasq
|
||||
if [[ "${svcOption}" =~ "reload" ]]; then
|
||||
# SIGHUP does NOT re-read any *.conf files
|
||||
# Using SIGHUP will NOT re-read any *.conf files
|
||||
svc="killall -s SIGHUP dnsmasq"
|
||||
elif [[ -z "${svcOption}" ]]; then
|
||||
# Get PID of dnsmasq to determine if it needs to start or restart
|
||||
|
@ -367,7 +364,7 @@ restartDNS() {
|
|||
svc="service dnsmasq ${svcOption}"
|
||||
fi
|
||||
|
||||
# Print output to Terminal, not Web Admin
|
||||
# Print output to Terminal, but not to Web Admin
|
||||
str="${svcOption^}ing DNS service"
|
||||
[[ -t 1 ]] && echo -ne " ${INFO} ${str}..."
|
||||
|
||||
|
@ -659,7 +656,7 @@ case "${1}" in
|
|||
"enable" ) piholeEnable 1;;
|
||||
"disable" ) piholeEnable 0 "$2";;
|
||||
"status" ) statusFunc "$2";;
|
||||
"restartdns" ) restartDNS;;
|
||||
"restartdns" ) restartDNS "$2";;
|
||||
"-a" | "admin" ) webpageFunc "$@";;
|
||||
"-t" | "tail" ) tailFunc;;
|
||||
"checkout" ) piholeCheckoutFunc "$@";;
|
||||
|
|
Loading…
Reference in a new issue