mirror of
https://github.com/pi-hole/pi-hole
synced 2025-01-03 04:30:55 +00:00
Debug need sudo
Signed-off-by: Christian König <ckoenig@posteo.de>
This commit is contained in:
parent
54ce8c2622
commit
614d18cd3d
25
pihole
25
pihole
@ -496,15 +496,37 @@ if [[ $# = 0 ]]; then
|
|||||||
helpFunc
|
helpFunc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# functions that do not requiere sudo power
|
||||||
case "${1}" in
|
case "${1}" in
|
||||||
"-h" | "help" | "--help" ) helpFunc;;
|
"-h" | "help" | "--help" ) helpFunc;;
|
||||||
"-v" | "version" ) versionFunc "$@";;
|
"-v" | "version" ) versionFunc "$@";;
|
||||||
"-c" | "chronometer" ) chronometerFunc "$@";;
|
"-c" | "chronometer" ) chronometerFunc "$@";;
|
||||||
"-d" | "debug" ) debugFunc "$@";;
|
|
||||||
"-q" | "query" ) queryFunc "$@";;
|
"-q" | "query" ) queryFunc "$@";;
|
||||||
"status" ) statusFunc "$2";;
|
"status" ) statusFunc "$2";;
|
||||||
"-t" | "tail" ) tailFunc "$2";;
|
"-t" | "tail" ) tailFunc "$2";;
|
||||||
"tricorder" ) tricorderFunc;;
|
"tricorder" ) tricorderFunc;;
|
||||||
|
|
||||||
|
# we need to add all arguments that require sudo power to not trigger the * argument
|
||||||
|
"-w" | "whitelist" ) ;;
|
||||||
|
"-b" | "blacklist" ) ;;
|
||||||
|
"--wild" | "wildcard" ) ;;
|
||||||
|
"--regex" | "regex" ) ;;
|
||||||
|
"--white-regex" | "white-regex" ) ;;
|
||||||
|
"--white-wild" | "white-wild" ) ;;
|
||||||
|
"-f" | "flush" ) ;;
|
||||||
|
"-up" | "updatePihole" ) ;;
|
||||||
|
"-r" | "reconfigure" ) ;;
|
||||||
|
"-g" | "updateGravity" ) ;;
|
||||||
|
"-l" | "logging" ) ;;
|
||||||
|
"uninstall" ) ;;
|
||||||
|
"enable" ) ;;
|
||||||
|
"disable" ) ;;
|
||||||
|
"-d" | "debug" ) ;;
|
||||||
|
"restartdns" ) ;;
|
||||||
|
"-a" | "admin" ) ;;
|
||||||
|
"checkout" ) ;;
|
||||||
|
"updatechecker" ) ;;
|
||||||
|
"arpflush" ) ;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
@ -535,6 +557,7 @@ case "${1}" in
|
|||||||
"uninstall" ) uninstallFunc;;
|
"uninstall" ) uninstallFunc;;
|
||||||
"enable" ) piholeEnable 1;;
|
"enable" ) piholeEnable 1;;
|
||||||
"disable" ) piholeEnable 0 "$2";;
|
"disable" ) piholeEnable 0 "$2";;
|
||||||
|
"-d" | "debug" ) debugFunc "$@";;
|
||||||
"restartdns" ) restartDNS "$2";;
|
"restartdns" ) restartDNS "$2";;
|
||||||
"-a" | "admin" ) webpageFunc "$@";;
|
"-a" | "admin" ) webpageFunc "$@";;
|
||||||
"checkout" ) piholeCheckoutFunc "$@";;
|
"checkout" ) piholeCheckoutFunc "$@";;
|
||||||
|
Loading…
Reference in New Issue
Block a user