* give an error message when a non-existing server is used
This commit is contained in:
parent
4487376499
commit
b4ead395c4
2 changed files with 8 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -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!"
|
||||
|
|
Loading…
Add table
Reference in a new issue