Changed parameter check to allow for none provided or starting with '-'
This commit is contained in:
parent
fee66eb2cd
commit
1172defe7e
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user