#!/bin/sh
#
# MacPorts generated daemondo support script
#

#
# Init
#
prefix=/opt/local
PATH=/opt/local/bin:/opt/local/sbin:$PATH; export PATH

#
# Start
#
Start()
{
	rabbitmq-server 2>&1
}

#
# Stop
#
Stop()
{
	rabbitmqctl stop 2>&1
}

#
# Restart
#
Restart()
{
	Stop
	Start
}

#
# Run
#
Run()
{
case $1 in
  start  ) Start   ;;
  stop   ) Stop    ;;
  restart) Restart ;;
  *      ) echo "$0: unknown argument: $1";;
esac
}

#
# Run a phase based on the selector
#
Run $1

