All pastes #720883 Raw Edit

aaosrv.sh

public text v1 · immutable
#720883 ·published 2007-09-30 19:40 UTC
rendered paste body
#! /bin/sh
# Filnavn: suid.sh
# Author: Lozzano
if [ -z ${1} ]; then
	echo "Valid commands {start|stop|restart}"
else
	if [ ${1} = "--help" ]; then
		echo "Valid commands {start|stop|restart}"
	else
		if [ ${1} = "start" ]; then
			LD_LIBRARY_PATH=. ./server-bin global Urban_Assault -nohomedir -ini=server.ini
		else
			if [ ${1} = "stop" ]; then
				PID=`(cat aaosrv.pid)`
				kill -9 `(cat aaosrv.pid)`
				echo "The AAO-Server with PID: $PID has now stopped"
			else
				if [ ${1} = "restart" ]; then
					kill -9 `(cat aaosrv.pid)`
					LD_LIBRARY_PATH=. ./server-bin global Urban_Assault -nohomedir -ini=server.ini
				else
					echo "Valid commands {start|stop|restart}"

				fi
			fi
		fi
	fi
fi