#!/sbin/runscript #UT2004 Dedicated Server Runscript by Ken Smith #change the following two variables to customize this script #default script starts up a Onslaught Server #goto www.unrealadmin.org to learn how to edit your options UCCDIR="/opt/ut2004-ded/System" OPTIONS="server ONS-Torlan?game=Onslaught.ONSOnslaughtGame ini=Default.ini log=server.log -nohomedir" #don't edit below here or the world will explode depend() { need net } start() { ebegin "Starting UT2004 Dedicated Server" cd $UCCDIR start-stop-daemon --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 $? }