summaryrefslogtreecommitdiff
blob: 88981a1060d9b4d83a68f470165552419c3f6171 (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
#!/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 $? 
}