Pi-hole checkout feature
This commit is contained in:
10
pihole
10
pihole
@@ -8,9 +8,8 @@
|
||||
# This file is copyright under the latest version of the EUPL.
|
||||
# Please see LICENSE file for your rights under this license.
|
||||
|
||||
readonly PI_HOLE_SCRIPT_DIR="/opt/pihole"
|
||||
|
||||
|
||||
PI_HOLE_SCRIPT_DIR="/opt/pihole"
|
||||
readonly wildcardlist="/etc/dnsmasq.d/03-pihole-wildcard.conf"
|
||||
# Must be root to use this tool
|
||||
if [[ ! $EUID -eq 0 ]];then
|
||||
@@ -280,6 +279,11 @@ tailFunc() {
|
||||
exit 0
|
||||
}
|
||||
|
||||
piholeCheckoutFunc() {
|
||||
source "${PI_HOLE_SCRIPT_DIR}"/piholeCheckout.sh
|
||||
checkout "$@"
|
||||
}
|
||||
|
||||
helpFunc() {
|
||||
cat << EOM
|
||||
::: Control all PiHole specific functions!
|
||||
@@ -313,6 +317,7 @@ helpFunc() {
|
||||
::: Blocking can also be disabled only temporarily, e.g.,
|
||||
::: 'pihole disable 5m' - will disable blocking for 5 minutes
|
||||
::: restartdns Restart dnsmasq
|
||||
::: checkout Check out different branches
|
||||
EOM
|
||||
exit 0
|
||||
}
|
||||
@@ -343,5 +348,6 @@ case "${1}" in
|
||||
"restartdns" ) restartDNS;;
|
||||
"-a" | "admin" ) webpageFunc "$@";;
|
||||
"-t" | "tail" ) tailFunc;;
|
||||
"checkout" ) piholeCheckoutFunc "$@";;
|
||||
* ) helpFunc;;
|
||||
esac
|
||||
|
Reference in New Issue
Block a user