Fixed a bug which prevented valid server names containing a reserved world.

This commit is contained in:
Marcus Whybrow 2012-06-05 00:50:01 +01:00
parent 45ee034f2c
commit e2d37a3c1c

View File

@ -98,7 +98,7 @@ debug() {
# It must also not be one of a list of reserved names. # It must also not be one of a list of reserved names.
is_valid_name() { is_valid_name() {
local valid="^[a-zA-Z0-9\_\-]+$" local valid="^[a-zA-Z0-9\_\-]+$"
local invalid="^start|stop|restart|version|server|jargroup|all$" local invalid="^(start|stop|restart|version|server|jargroup|all)$"
if [[ "$1" =~ $valid ]]; then if [[ "$1" =~ $valid ]]; then
if [[ "$1" =~ $invalid ]]; then if [[ "$1" =~ $invalid ]]; then