mirror of
https://github.com/pi-hole/pi-hole.git
synced 2024-11-15 10:43:55 +00:00
Consistency
We went with tabs earlier, may as well make that the "standard". Easy enough to switch to spaces too if that's desired with expand(1)
This commit is contained in:
parent
ebbe1fc236
commit
640398ced4
1 changed files with 60 additions and 61 deletions
33
pihole
33
pihole
|
@ -66,8 +66,7 @@ setupLCDFunction() {
|
||||||
|
|
||||||
queryFunc() {
|
queryFunc() {
|
||||||
domain=$2
|
domain=$2
|
||||||
for list in /etc/pihole/list.*
|
for list in /etc/pihole/list.*; do
|
||||||
do
|
|
||||||
count=$(grep ${domain} $list | wc -l)
|
count=$(grep ${domain} $list | wc -l)
|
||||||
echo "::: ${list} (${count} results)"
|
echo "::: ${list} (${count} results)"
|
||||||
if [[ ${count} > 0 ]]; then
|
if [[ ${count} > 0 ]]; then
|
||||||
|
@ -125,19 +124,19 @@ if [[ $# = 0 ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Handle redirecting to specific functions based on arguments
|
# Handle redirecting to specific functions based on arguments
|
||||||
case "$1" in
|
case "${1}" in
|
||||||
"-w" | "whitelist" ) whitelistFunc "$@";;
|
"-w" | "whitelist" ) whitelistFunc "$@";;
|
||||||
"-b" | "blacklist" ) blacklistFunc "$@";;
|
"-b" | "blacklist" ) blacklistFunc "$@";;
|
||||||
"-d" | "debug" ) debugFunc;;
|
"-d" | "debug" ) debugFunc;;
|
||||||
"-f" | "flush" ) flushFunc;;
|
"-f" | "flush" ) flushFunc;;
|
||||||
"-up" | "updatePihole" ) updatePiholeFunc;;
|
"-up" | "updatePihole" ) updatePiholeFunc;;
|
||||||
"-r" | "reconfigure" ) reconfigurePiholeFunc;;
|
"-r" | "reconfigure" ) reconfigurePiholeFunc;;
|
||||||
"-g" | "updateGravity" ) updateGravityFunc "$@";;
|
"-g" | "updateGravity" ) updateGravityFunc "$@";;
|
||||||
"-s" | "setupLCD" ) setupLCDFunction;;
|
"-s" | "setupLCD" ) setupLCDFunction;;
|
||||||
"-c" | "chronometer" ) chronometerFunc "$@";;
|
"-c" | "chronometer" ) chronometerFunc "$@";;
|
||||||
"-h" | "help" ) helpFunc;;
|
"-h" | "help" ) helpFunc;;
|
||||||
"-v" | "version" ) versionFunc "$@";;
|
"-v" | "version" ) versionFunc "$@";;
|
||||||
"-q" | "query" ) queryFunc "$@";;
|
"-q" | "query" ) queryFunc "$@";;
|
||||||
"uninstall" ) uninstallFunc;;
|
"uninstall" ) uninstallFunc;;
|
||||||
* ) helpFunc;;
|
* ) helpFunc;;
|
||||||
esac
|
esac
|
||||||
|
|
Loading…
Reference in a new issue