mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Add "update" and "help" as invalid server names
This commit is contained in:
parent
36a29a84dc
commit
f065622794
4
init/msm
4
init/msm
@ -242,11 +242,11 @@ debug() {
|
||||
# $1: The name to check
|
||||
is_valid_name() {
|
||||
local valid="^[a-zA-Z0-9\_\-]+$"
|
||||
local invalid="^(start|stop|restart|version|server|jargroup|all|config|\-\-.*)$"
|
||||
local invalid="^(start|stop|restart|version|server|jargroup|all|config|update|help|\-\-.*)$"
|
||||
|
||||
if [[ "$1" =~ $valid ]]; then
|
||||
if [[ "$1" =~ $invalid ]]; then
|
||||
error_exit INVALID_ARGUMENT "Invalid name \"$1\": A name may not be any of the following reserved worlds \"start\", \"stop\", \"restart\", \"server\", \"version\", \"jargroup\", \"all\", \"config\" or start with two dashes (--)."
|
||||
error_exit INVALID_ARGUMENT "Invalid name \"$1\": A name may not be any of the following reserved worlds \"start\", \"stop\", \"restart\", \"server\", \"version\", \"jargroup\", \"all\", \"config\", \"update\" or \"help\" or start with two dashes (--)."
|
||||
else
|
||||
return 0
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user