updated on Sun Jan 15 16:02:00 UTC 2012
[aur-mirror.git] / sd_agent / sd-agent.init
blobdcaaaf90616dc033d83e7f2a88f099c588c6fc32
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting sd-agent"
9 [ ! -f /var/run/sd-agent.pid ] && /usr/bin/sd-agent/agent.py start init --clean
10 if [ $? -gt 0 ]; then
11 stat_fail
12 else
13 stat_done
16 stop)
17 stat_busy "Stopping sd-agent"
18 [ -f /var/run/sd-agent.pid ] && /usr/bin/sd-agent/agent.py stop init
19 if [ $? -gt 0 ]; then
20 stat_fail
21 else
22 stat_done
25 restart)
26 $0 stop
27 sleep 3
28 $0 start
31 echo "usage: $0 {start|stop|restart}"
32 esac
33 exit 0