From 29cb8120f50c7954568a1ba22a85b4a3e8c99697 Mon Sep 17 00:00:00 2001 From: Mayur Raiturkar Date: Sun, 17 Apr 2016 17:06:11 +0530 Subject: [PATCH] fixed helpFunc#2 --- advanced/Scripts/whitelist.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/advanced/Scripts/whitelist.sh b/advanced/Scripts/whitelist.sh index e69e8804..049e158a 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,11 @@ 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/')