1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67
|
#!/bin/sh
USAGE="Alien Arena server wrapper
This script is Debian specific, it is *NOT* part of the source distribution!
Usage: alien-arena-server [OPTION] [PARAMETERS]...
-h, --help Display this help
-q, --quiet Disable console output
-s, --service Launch server as a service
-k, --kill Kill runaway server sessions
-Q, --query Query local servers
-r, --rcon Sends rcon commands to servers
[PARAMETERS] Pass internal parameters for specified script
More information on using this script can be found in the alien-arena-server(6) man page."
QUIET=0
LAUNCH_SERVER_AS_SERVICE=0
KILL_RUNAWAY_CRDED=0
SVSTAT=0
RCON=0
case "$1" in
-h|--help)
echo "${USAGE}"
exit 0
;;
-q|--quiet)
QUIET=1
shift
;;
-s|--service)
LAUNCH_SERVER_AS_SERVICE=1
shift
;;
-k|--kill)
KILL_RUNAWAY_CRDED=1
shift
;;
-Q|--query)
SVSTAT=1
shift
;;
-r|--rcon)
RCON=1
shift
;;
esac
# Ready to rumble!
export COR_GAME="$HOME/.config/alien-arena"
ln -s /usr/share/games/alien-arena/data1 $COR_GAME
if [ ${LAUNCH_SERVER_AS_SERVICE} = 1 ]; then
exec /usr/lib/games/alien-arena/launch-server "$@"
elif [ ${KILL_RUNAWAY_CRDED} = 1 ]; then
exec /usr/lib/games/alien-arena/kill-runaway-crded "$@"
elif [ ${SVSTAT} = 1 ]; then
exec /usr/lib/games/alien-arena/svstat "$@"
elif [ ${RCON} = 1 ]; then
exec /usr/lib/games/alien-arena/rcon "$@"
elif [ ${QUIET} = 1 ]; then
cd /usr/share/games/alien-arena
exec /usr/lib/games/alien-arena/crded "$@" >/dev/null 2>&1
else
cd /usr/share/games/alien-arena
exec /usr/lib/games/alien-arena/crded "$@"
fi
|