mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Added "all" the list of invalid names.
This commit is contained in:
parent
135ed48ba0
commit
ebb13794fc
4
msm
4
msm
@ -63,11 +63,11 @@ echoerr() {
|
||||
# It must also not be one of a list of reserved names.
|
||||
is_valid_name() {
|
||||
local valid="^[a-zA-Z0-9\_\-]+$"
|
||||
local invalid="^server|jargroup|start|stop|restart$"
|
||||
local invalid="^server|jargroup|start|stop|restart|all$"
|
||||
|
||||
if [[ "$1" =~ $valid ]]; then
|
||||
if [[ "$1" =~ $invalid ]]; then
|
||||
echoerr "Invalid name \"$1\": A name may not be any of the following reserved worlds \"start\", \"stop\", \"restart\", \"server\" or \"jargroup\"."
|
||||
echoerr "Invalid name \"$1\": A name may not be any of the following reserved worlds \"start\", \"stop\", \"restart\", \"server\", \"jargroup\" or \"all\"."
|
||||
return 1
|
||||
else
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user