From ba3e290915a41dbe6a8b885e00ba0a796376fb58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 4 Jun 2023 21:21:48 +0200 Subject: [PATCH] Fix shellcheck errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- advanced/Scripts/piholeLogFlush.sh | 6 +++--- pihole | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/advanced/Scripts/piholeLogFlush.sh b/advanced/Scripts/piholeLogFlush.sh index 3473fad5..14542e4b 100755 --- a/advanced/Scripts/piholeLogFlush.sh +++ b/advanced/Scripts/piholeLogFlush.sh @@ -30,10 +30,10 @@ if [ -z "$DBFILE" ]; then DBFILE="/etc/pihole/pihole-FTL.db" fi -if [[ "$@" != *"quiet"* ]]; then +if [[ "$*" != *"quiet"* ]]; then echo -ne " ${INFO} Flushing /var/log/pihole/pihole.log ..." fi -if [[ "$@" == *"once"* ]]; then +if [[ "$*" == *"once"* ]]; then # Nightly logrotation if command -v /usr/sbin/logrotate >/dev/null; then # Logrotate once @@ -69,7 +69,7 @@ else sudo pihole restartdns fi -if [[ "$@" != *"quiet"* ]]; then +if [[ "$*" != *"quiet"* ]]; then echo -e "${OVER} ${TICK} Flushed /var/log/pihole/pihole.log" echo -e " ${TICK} Deleted ${deleted} queries from database" fi diff --git a/pihole b/pihole index 0be995e4..b762c7d4 100755 --- a/pihole +++ b/pihole @@ -196,7 +196,7 @@ Time: echo -e " ${INFO} Blocking already disabled, nothing to do" exit 0 fi - if [[ $# > 1 ]]; then + if [[ $# -gt 1 ]]; then local error=false if [[ "${2}" == *"s" ]]; then tt=${2%"s"}