File pihole0-disable-features.patch of Package pihole
diff -Naur a/advanced/bash-completion/pihole b/advanced/bash-completion/pihole
--- a/advanced/bash-completion/pihole 2018-09-15 17:17:24.299718252 -0500
+++ b/advanced/bash-completion/pihole 2018-09-16 00:20:17.257775334 -0500
@@ -1,5 +1,5 @@
_pihole() {
- local cur prev opts opts_admin opts_checkout opts_chronometer opts_debug opts_interface opts_logging opts_privacy opts_query opts_update opts_version
+ local cur prev opts opts_chronometer opts_debug opts_interface opts_logging opts_privacy opts_query
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
@@ -7,21 +7,13 @@
case "${prev}" in
"pihole")
- opts="admin blacklist checkout chronometer debug disable enable flush help logging query reconfigure regex restartdns status tail uninstall updateGravity updatePihole version wildcard whitelist"
+ opts="blacklist chronometer debug disable enable flush help logging query regex restartdns status systemd tail updateGravity wildcard whitelist"
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
;;
"whitelist"|"blacklist"|"wildcard"|"regex")
opts_lists="\--delmode \--noreload \--quiet \--list \--nuke"
COMPREPLY=( $(compgen -W "${opts_lists}" -- ${cur}) )
;;
- "admin")
- opts_admin="celsius email fahrenheit hostrecord interface kelvin password privacylevel"
- COMPREPLY=( $(compgen -W "${opts_admin}" -- ${cur}) )
- ;;
- "checkout")
- opts_checkout="core ftl web master dev"
- COMPREPLY=( $(compgen -W "${opts_checkout}" -- ${cur}) )
- ;;
"chronometer")
opts_chronometer="\--exit \--json \--refresh"
COMPREPLY=( $(compgen -W "${opts_chronometer}" -- ${cur}) )
@@ -38,14 +30,6 @@
opts_query="-adlist -all -exact"
COMPREPLY=( $(compgen -W "${opts_query}" -- ${cur}) )
;;
- "updatePihole"|"-up")
- opts_update="--check-only"
- COMPREPLY=( $(compgen -W "${opts_update}" -- ${cur}) )
- ;;
- "version")
- opts_version="\--admin \--current \--ftl \--hash \--latest \--pihole"
- COMPREPLY=( $(compgen -W "${opts_version}" -- ${cur}) )
- ;;
"interface")
if ( [[ "$prev2" == "admin" ]] || [[ "$prev2" == "-a" ]] ); then
opts_interface="$(cat /proc/net/dev | cut -d: -s -f1)"
@@ -62,14 +46,6 @@
return 1
fi
;;
- "core"|"admin"|"ftl")
- if [[ "$prev2" == "checkout" ]]; then
- opts_checkout="master dev"
- COMPREPLY=( $(compgen -W "${opts_checkout}" -- ${cur}) )
- else
- return 1
- fi
- ;;
*)
return 1
;;
diff -Naur a/pihole b/pihole
--- a/pihole 2018-09-15 17:17:24.689716347 -0500
+++ b/pihole 2018-09-16 00:34:51.843603897 -0500
@@ -284,6 +284,10 @@
fi
}
+systemdFunc() {
+ # Show systemd status
+ systemctl status pihole-FTL.service pihole-logrotate.timer pihole-updateGravity.timer
+}
tailFunc() {
# Warn user if Pi-hole's logging is disabled
local logging_enabled=$(grep -c "^log-queries" /etc/dnsmasq.d/01-pihole.conf)
@@ -384,12 +388,9 @@
-d, debug Start a debugging session
Add '-a' to enable automated debugging
-f, flush Flush the Pi-hole log
- -r, reconfigure Reconfigure or Repair Pi-hole subsystems
-t, tail View the live output of the Pi-hole log
Options:
- -a, admin Web interface options
- Add '-h' for more info on Web Interface usage
-c, chronometer Calculates stats and displays to an LCD
Add '-h' for more info on chronometer usage
-g, updateGravity Update the list of ad-serving domains
@@ -398,18 +399,12 @@
Add '-h' for more info on logging usage
-q, query Query the adlists for a specified domain
Add '-h' for more info on query usage
- -up, updatePihole Update Pi-hole subsystems
- Add '--check-only' to exit script before update is performed.
- -v, version Show installed versions of Pi-hole, Web Interface & FTL
- Add '-h' for more info on version usage
- uninstall Uninstall Pi-hole from your system
status Display the running status of Pi-hole subsystems
+ systemd Display status of systemd service and timers
enable Enable Pi-hole subsystems
disable Disable Pi-hole subsystems
Add '-h' for more info on disable usage
- restartdns Restart Pi-hole subsystems
- checkout Switch Pi-hole subsystems to a different Github branch
- Add '-h' for more info on checkout usage";
+ restartdns Restart Pi-hole subsystems";
exit 0
}
@@ -425,23 +420,17 @@
"--regex" | "regex" ) listFunc "$@";;
"-d" | "debug" ) debugFunc "$@";;
"-f" | "flush" ) flushFunc "$@";;
- "-up" | "updatePihole" ) updatePiholeFunc "$@";;
- "-r" | "reconfigure" ) reconfigurePiholeFunc;;
"-g" | "updateGravity" ) updateGravityFunc "$@";;
"-c" | "chronometer" ) chronometerFunc "$@";;
"-h" | "help" ) helpFunc;;
- "-v" | "version" ) versionFunc "$@";;
"-q" | "query" ) queryFunc "$@";;
"-l" | "logging" ) piholeLogging "$@";;
- "uninstall" ) uninstallFunc;;
"enable" ) piholeEnable 1;;
"disable" ) piholeEnable 0 "$2";;
"status" ) statusFunc "$2";;
+ "systemd" ) systemdFunc;;
"restartdns" ) restartDNS "$2";;
- "-a" | "admin" ) webpageFunc "$@";;
"-t" | "tail" ) tailFunc;;
- "checkout" ) piholeCheckoutFunc "$@";;
"tricorder" ) tricorderFunc;;
- "updatechecker" ) updateCheckFunc "$@";;
* ) helpFunc;;
esac