updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / rabbitmq / rabbitmq-server-rc.d
blob1bad5b216862863e7d3a16e5573b6b3f15d4b56f
1 #!/bin/bash
3 daemon_name=rabbitmq-server
5 . /etc/rc.conf
6 . /etc/rc.d/functions
8 case "$1" in
9 start)
10 stat_busy "Starting $daemon_name daemon"
12 # RUN
13 /usr/sbin/rabbitmq-server -detached
15 if [ $? -gt 0 ]; then
16 stat_fail
17 exit 1
18 else
19 add_daemon $daemon_name
20 stat_done
24 stop)
25 stat_busy "Stopping $daemon_name daemon"
26 # KILL
27 /usr/sbin/rabbitmqctl stop
29 if [ $? -gt 0 ]; then
30 stat_fail
31 exit 1
32 else
33 rm_daemon $daemon_name
34 stat_done
38 restart)
39 $0 stop
40 sleep 3
41 $0 start
44 status)
45 stat_busy "Checking $daemon_name status";
46 ck_status $daemon_name
50 echo "usage: $0 {start|stop|restart|status}"
51 esac
53 exit 0