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 ### Process script parameters
# if no parameters provided, of if parameters do not start with a '-' then show # If parameters are provided but don't start with '-' then show the help page
# the help page and exit with error # and exit with an error
if [ -z "$1" ] || [[ ! "$1" =~ ^- ]]; then if [ -n "$1" ] && [[ ! "$1" =~ ^- ]]; then
# show script help page # show script help page
scriptHelp scriptHelp
fi fi