3 # Start/stop rabbitmq-server
7 RUNDIR
=/var
/run
/rabbitmq
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"
17 printf "Stopping rabbitmq-server: "
18 su
-c "/usr/sbin/rabbitmqctl stop" - "$INSTALLUSER"
19 [ $?
= 0 ] && echo "OK" ||
echo "FAIL"
26 echo "Usage: $0 {start|stop|restart}"