From f3c27f706f3b2007b9cdbbab4747a4ff4834d8ed Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Wed, 23 Nov 2022 14:07:30 -0300 Subject: [PATCH 1/2] Pass only the correct argument Signed-off-by: RD WebDesign --- pihole | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pihole b/pihole index aad83451..ed8eb856 100755 --- a/pihole +++ b/pihole @@ -425,7 +425,7 @@ tricorderFunc() { } updateCheckFunc() { - "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@" + "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$1" exit 0 } @@ -553,7 +553,7 @@ case "${1}" in "restartdns" ) restartDNS "$2";; "-a" | "admin" ) webpageFunc "$@";; "checkout" ) piholeCheckoutFunc "$@";; - "updatechecker" ) updateCheckFunc "$@";; + "updatechecker" ) updateCheckFunc "$2";; "arpflush" ) arpFunc "$@";; "-t" | "tail" ) tailFunc "$2";; esac From 233453267e20a3baedc350324daa73311a26c0ed Mon Sep 17 00:00:00 2001 From: RD WebDesign Date: Wed, 23 Nov 2022 15:33:49 -0300 Subject: [PATCH 2/2] Using `shift` to allow passing multiple arguments Signed-off-by: RD WebDesign --- pihole | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pihole b/pihole index ed8eb856..ca80bff8 100755 --- a/pihole +++ b/pihole @@ -425,7 +425,7 @@ tricorderFunc() { } updateCheckFunc() { - "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$1" + "${PI_HOLE_SCRIPT_DIR}"/updatecheck.sh "$@" exit 0 } @@ -553,7 +553,7 @@ case "${1}" in "restartdns" ) restartDNS "$2";; "-a" | "admin" ) webpageFunc "$@";; "checkout" ) piholeCheckoutFunc "$@";; - "updatechecker" ) updateCheckFunc "$2";; + "updatechecker" ) shift; updateCheckFunc "$@";; "arpflush" ) arpFunc "$@";; "-t" | "tail" ) tailFunc "$2";; esac