#!/sbin/runscript # UT2004 Dedicated Server Runscript by Ken Smith # Change the following two variables to customize this script. The default # script starts up a Onslaught Server. # Goto http://www.unrealadmin.org to learn how to edit your options UCCDIR="GAMES_PREFIX_OPT/ut2004-ded/System" OPTIONS="server ONS-Torlan?game=Onslaught.ONSOnslaughtGame ini=Default.ini log=server.log -nohomedir" ### Do not edit below here or the world will explode ### depend() { need net } start() { ebegin "Starting UT2004 Dedicated Server" cd ${UCCDIR} start-stop-daemon --chdir ${UCCDIR} --env PWD=${UCCDIR} --make-pidfile --start --quiet --pidfile /var/run/ucc-bin.pid --exec ucc-bin -- ${OPTIONS} >> /dev/null & eend $? "Failed to start UT2004 Dedicated Server" } stop() { ebegin "Stopping UT2004 Dedicated Server" start-stop-daemon --stop --quiet --pidfile /var/run/ucc-bin.pid -- >> /dev/null eend $? "Failed to stop UT2004 Dedicated Server" sleep 1 } reload() { if [[ ! -f /var/run/ucc-bin.pid ]] ; then eerror "UT2004 Dedicated Server isn't running" return 1 fi ebegin "Reloading UT2004 Dedicated Server" kill -HUP `cat /var/run/ucc-bin.pid` &>/dev/null eend $? }