updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / teeworlds-srv-catch16 / teeworlds-srv-catch16
blob3ed6c3e43e6c2e6b36e82318637d8531cb6a0c25
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting Teeworlds Catch16 Server"
9 if [ $(pidof /usr/bin/teeworlds-srv-catch16) ]; then
10 stat_fail
11 else
12 su andy -c '/usr/bin/teeworlds-srv-catch16 -f /srv/teeworlds/catch16.cfg &> /var/log/teeworlds-catch16.log &'
13 add_daemon teeworlds-catch16
15 stat_done
17 stop)
18 stat_busy "Stopping Teeworlds Catch16 Server"
19 killall teeworlds-srv-catch16 &> /dev/null
20 if [ $? -gt 0 ]; then
21 stat_fail
22 else
23 rm_daemon teeworlds-catch16
24 stat_done
27 restart)
28 $0 stop
29 $0 start
32 echo "usage: $0 {start|stop|restart}"
33 esac
34 exit 0