updated on Fri Jan 13 08:00:32 UTC 2012
[aur-mirror.git] / hellanzb-git / hellanzb.rc
blob36adc573d9e10fa5d8adaff2d994ef53657daf84
1 #!/bin/bash
3 # source application-specific settings
4 [ -f /etc/conf.d/hellanzb ] && . /etc/conf.d/hellanzb
6 . /etc/rc.conf
7 . /etc/rc.d/functions
9 case "$1" in
10 start)
11 stat_busy "Starting hellanzb"
12 /bin/su - ${HELLANZB_USER} -c " /usr/bin/python2 /usr/bin/hellanzb.py -D -c ${HELLANZB_CONF} &> /dev/null"
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon hellanzb
17 stat_done
20 stop)
21 stat_busy "Stopping hellanzb"
22 /bin/su - ${HELLANZB_USER} -c " /usr/bin/python2 /usr/bin/hellanzb.py -c ${HELLANZB_CONF} shutdown &> /dev/null"
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon hellanzb
27 stat_done
30 restart)
31 $0 stop
32 sleep 2
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
37 esac
38 exit 0