From 1172defe7e64225ed9048f8d3657c88475780f37 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Mon, 1 Oct 2018 23:26:04 -0600 Subject: [PATCH] Changed parameter check to allow for none provided or starting with '-' --- backup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/backup.sh b/backup.sh index 7d7779a..523a584 100755 --- a/backup.sh +++ b/backup.sh @@ -166,9 +166,9 @@ warn503="Web users will NOT be informed the server is down!" ### Process script parameters -# if no parameters provided, of if parameters do not start with a '-' then show -# the help page and exit with error -if [ -z "$1" ] || [[ ! "$1" =~ ^- ]]; then +# If parameters are provided but don't start with '-' then show the help page +# and exit with an error +if [ -n "$1" ] && [[ ! "$1" =~ ^- ]]; then # show script help page scriptHelp fi