python-dataproperty: bump version to 0.17.0
[buildroot-gz.git] / package / rabbitmq-server / S50rabbitmq-server
blobfaf248ded28b3da29a194b45fd714fcebf069f1a
1 #!/bin/sh
3 # Start/stop rabbitmq-server
6 INSTALLUSER=rabbitmq
7 RUNDIR=/var/run/rabbitmq
9 case "$1" in
10 start)
11 install -d -o "$INSTALLUSER" -g "$INSTALLUSER" "$RUNDIR" || exit 1
12 printf "Starting rabbitmq-server: "
13 su -c "/usr/sbin/rabbitmq-server -detached" - "$INSTALLUSER" 2>/dev/null
14 [ $? = 0 ] && echo "OK" || echo "FAIL"
16 stop)
17 printf "Stopping rabbitmq-server: "
18 su -c "/usr/sbin/rabbitmqctl stop" - "$INSTALLUSER"
19 [ $? = 0 ] && echo "OK" || echo "FAIL"
21 restart|reload)
22 "$0" stop || true
23 "$0" start
26 echo "Usage: $0 {start|stop|restart}"
27 exit 1
28 esac