blob: 23939b49039d3f8ab65ba893ad3e1d555abcac50 (
plain)
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
|
#!/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 $?
}
|