mirror of
https://github.com/msmhq/msm.git
synced 2024-08-30 18:12:35 +00:00
Validation checks for create and server commands.
This commit is contained in:
parent
173895ec28
commit
bef9ce7916
8
msm
8
msm
@ -223,7 +223,11 @@ case "$1" in
|
||||
;;
|
||||
create)
|
||||
# Create a new server
|
||||
if [ -z $2 ]; then
|
||||
echo "Invalid command."
|
||||
else
|
||||
manager_create_server $2
|
||||
fi
|
||||
;;
|
||||
delete)
|
||||
# Delete an existing server, with confirmation
|
||||
@ -316,6 +320,7 @@ case "$1" in
|
||||
*)
|
||||
# TODO: Check first if $1 is an existing server name
|
||||
|
||||
if is_valid_name "$1" && [[ -e $SERVER_STORAGE_PATH/$1 ]]; then
|
||||
case "$2" in
|
||||
start)
|
||||
;;
|
||||
@ -356,6 +361,9 @@ case "$1" in
|
||||
cmdlog)
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "No server with that name."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user