Validation checks for create and server commands.

This commit is contained in:
Marcus Whybrow 2012-05-21 15:52:31 +01:00
parent 173895ec28
commit bef9ce7916

8
msm
View File

@ -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