mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-21 21:53:43 +00:00
Remove the restartdns functionality and promote the reloaddns functions (#5780)
This commit is contained in:
commit
7dd2eb20a2
3 changed files with 59 additions and 67 deletions
|
@ -7,7 +7,7 @@ _pihole() {
|
|||
|
||||
case "${prev}" in
|
||||
"pihole")
|
||||
opts="allow allow-regex allow-wild deny checkout debug disable enable flush help logging query reconfigure regex restartdns status tail uninstall updateGravity updatePihole version wildcard arpflush api"
|
||||
opts="allow allow-regex allow-wild deny checkout debug disable enable flush help logging query reconfigure regex reloaddns reloadlists status tail uninstall updateGravity updatePihole version wildcard arpflush api"
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
;;
|
||||
"allow"|"deny"|"wildcard"|"regex"|"allow-regex"|"allow-wild")
|
||||
|
|
|
@ -236,16 +236,14 @@ Available commands and options:
|
|||
#m Disable Pi-hole functionality for # minute(s)
|
||||
.br
|
||||
|
||||
\fBrestartdns\fR [options]
|
||||
\fBreloaddns\fR
|
||||
.br
|
||||
Full restart Pi-hole subsystems. Without any options (see below) a full restart causes config file parsing and history re-reading
|
||||
Update the lists and flush the cache without restarting the DNS server
|
||||
.br
|
||||
|
||||
(restart options):
|
||||
\fBreloadlists\fR
|
||||
.br
|
||||
reload Updates the lists (incl. HOSTS files) and flushes DNS cache. Does not reparse config files
|
||||
.br
|
||||
reload-lists Updates the lists (excl. HOSTS files) WITHOUT flushing the DNS cache. Does not reparse config files
|
||||
Update the lists WITHOUT flushing the cache or restarting the DNS server
|
||||
.br
|
||||
|
||||
\fBcheckout\fR [repo] [branch]
|
||||
|
|
20
pihole
20
pihole
|
@ -147,9 +147,9 @@ versionFunc() {
|
|||
exec "${PI_HOLE_SCRIPT_DIR}"/version.sh
|
||||
}
|
||||
|
||||
restartDNS() {
|
||||
reloadDNS() {
|
||||
local svcOption svc str output status pid icon FTL_PID_FILE
|
||||
svcOption="${1:-restart}"
|
||||
svcOption="${1:-reload}"
|
||||
|
||||
# get the current path to the pihole-FTL.pid
|
||||
FTL_PID_FILE="$(getFTLConfigValue files.pid)"
|
||||
|
@ -184,11 +184,6 @@ restartDNS() {
|
|||
str="Flushing DNS cache"
|
||||
icon="${TICK}"
|
||||
fi
|
||||
else
|
||||
# A full restart has been requested
|
||||
svc="service pihole-FTL restart"
|
||||
str="Restarting DNS server"
|
||||
icon="${TICK}"
|
||||
fi
|
||||
|
||||
# Print output to Terminal, but not to Web Admin
|
||||
|
@ -509,9 +504,8 @@ Options:
|
|||
enable Enable Pi-hole subsystems
|
||||
disable Disable Pi-hole subsystems
|
||||
Add '-h' for more info on disable usage
|
||||
restartdns Full restart Pi-hole subsystems
|
||||
Add 'reload' to update the lists and flush the cache without restarting the DNS server
|
||||
Add 'reload-lists' to only update the lists WITHOUT flushing the cache or restarting the DNS server
|
||||
reloaddns Update the lists and flush the cache without restarting the DNS server
|
||||
reloadlists Update the lists WITHOUT flushing the cache or restarting the DNS server
|
||||
checkout Switch Pi-hole subsystems to a different GitHub branch
|
||||
Add '-h' for more info on checkout usage
|
||||
arpflush Flush information stored in Pi-hole's network tables";
|
||||
|
@ -547,9 +541,9 @@ case "${1}" in
|
|||
"enable" ) need_root=0;;
|
||||
"disable" ) need_root=0;;
|
||||
"-d" | "debug" ) ;;
|
||||
"restartdns" ) ;;
|
||||
"-g" | "updateGravity" ) ;;
|
||||
"reloaddns" ) ;;
|
||||
"reloadlists" ) ;;
|
||||
"setpassword" ) ;;
|
||||
"checkout" ) ;;
|
||||
"updatechecker" ) ;;
|
||||
|
@ -590,8 +584,8 @@ case "${1}" in
|
|||
"uninstall" ) uninstallFunc;;
|
||||
"enable" ) piholeEnable true "$2";;
|
||||
"disable" ) piholeEnable false "$2";;
|
||||
"restartdns" ) restartDNS "$2";;
|
||||
"reloaddns" ) restartDNS "reload";;
|
||||
"reloaddns" ) reloadDNS "reload";;
|
||||
"reloadlists" ) reloadDNS "reload-lists";;
|
||||
"setpassword" ) SetWebPassword "$@";;
|
||||
"checkout" ) piholeCheckoutFunc "$@";;
|
||||
"updatechecker" ) shift; updateCheckFunc "$@";;
|
||||
|
|
Loading…
Reference in a new issue