* give an error message when a non-existing server is used

This commit is contained in:
Gunter Labes 2008-03-19 02:55:08 +00:00
parent 4487376499
commit b4ead395c4
2 changed files with 8 additions and 2 deletions

View file

@ -7,7 +7,10 @@ fi
SERVER=$1
SERVERBASE=$HOME/servers/$SERVER
SOCKET=$SERVERBASE/build/var/run/socket
if ! [ -d "$SERVERBASE" ]; then
echo "Server '$SERVER' not found."
exit 1
fi
if ! [ -e $SOCKET ]; then
echo "$SOCKET not found, using the 'oldbuild'."
SOCKET=$SERVERBASE/oldbuild/var/run/socket

View file

@ -7,7 +7,10 @@ fi
SERVER=$1
SERVERBASE=$HOME/servers/$SERVER
SOCKET=$SERVERBASE/build/var/run/socket
if ! [ -d "$SERVERBASE" ]; then
echo "Server '$SERVER' not found."
exit 1
fi
shift
if [ "$*" == "" ]; then
message="The server will get restarted now. Please don't forget to save your game!"