From b58519b974251e3bba7a40df78e1229d2c2482eb Mon Sep 17 00:00:00 2001 From: Mayur Raiturkar Date: Sun, 17 Apr 2016 18:21:32 +0530 Subject: [PATCH 1/2] fixed helpFunc 1 --- advanced/Scripts/blacklist.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/blacklist.sh b/advanced/Scripts/blacklist.sh index aa98f011..ae9cee16 100755 --- a/advanced/Scripts/blacklist.sh +++ b/advanced/Scripts/blacklist.sh @@ -10,9 +10,6 @@ # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. -if [[ $# = 0 ]]; then - helpFunc -fi #globals basename=pihole @@ -65,6 +62,10 @@ function helpFunc() exit 1 } +if [[ $# = 0 ]]; then + helpFunc +fi + function HandleOther(){ #check validity of domain validDomain=$(echo "$1" | perl -ne'print if /\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/') From 56ac04c48e8c867a1ec2b1b1cdd1b0571b749735 Mon Sep 17 00:00:00 2001 From: Mayur Raiturkar Date: Sun, 17 Apr 2016 18:22:06 +0530 Subject: [PATCH 2/2] fixed helpFunc 2 --- advanced/Scripts/whitelist.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/whitelist.sh b/advanced/Scripts/whitelist.sh index e69e8804..8e9fa9c7 100755 --- a/advanced/Scripts/whitelist.sh +++ b/advanced/Scripts/whitelist.sh @@ -10,9 +10,6 @@ # the Free Software Foundation, either version 2 of the License, or # (at your option) any later version. -if [[ $# = 0 ]]; then - helpFunc -fi #globals basename=pihole @@ -64,6 +61,10 @@ function helpFunc() exit 1 } +if [[ $# = 0 ]]; then + helpFunc +fi + function HandleOther(){ #check validity of domain validDomain=$(echo "$1" | perl -ne'print if /\b((?=[a-z0-9-]{1,63}\.)(xn--)?[a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,63}\b/')