updated on Sat Jan 14 16:01:55 UTC 2012
[aur-mirror.git] / disco / disco-node
blob1bd3f81e6c89b965b7e7d24634d73076da9774bf
1 #!/bin/bash
3 # general config
4 . /etc/rc.conf
5 . /etc/rc.d/functions
7 . /etc/disco/disco.conf
9 case "$1" in
10 start)
11 stat_busy "Starting Disco Node"
12 lighttpd -f /etc/disco/lighttpd-node.conf
13 if [ $? -gt 0 ]; then
14 stat_fail
15 else
16 add_daemon disco-node
17 stat_done
20 stop)
21 stat_busy "Stopping Disco Node"
22 kill $(cat /var/run/disco/disco-lighttpd.pid) &> /dev/null
23 if [ $? -gt 0 ]; then
24 stat_fail
25 else
26 rm_daemon disco-node
27 stat_done
30 restart)
31 $0 stop
32 sleep 1
33 $0 start
36 echo "usage: $0 {start|stop|restart}"
38 esac
39 exit 0