Changed parameter check to allow for none provided or starting with '-'

This commit is contained in:
Asif Bacchus 2018-10-01 23:26:04 -06:00
parent fee66eb2cd
commit 1172defe7e

View File

@ -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