Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: e76cffd8b0
Fetching contributors…

Cannot retrieve contributors at this time

executable file 16 lines (15 sloc) 0.754 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#!/bin/bash

#Hack to parse rabbitmq pid and place it into the correct directory. This is also
#done in our rabbitmq init.d script, but placing it here so that monit recognizes
# it faster (in time for the upcoming airtime-check-system)
codename=`lsb_release -cs`
if [ "$codename" = "lucid" -o "$codename" = "maverick" -o "$codename" = "natty" -o "$codename" = "squeeze" ]
then
    rabbitmqpid=`sed "s/.*,\(.*\)\}.*/\1/" /var/lib/rabbitmq/pids`
else
    #RabbitMQ in Ubuntu Oneiric and newer have a different way of storing the PID.
    rabbitmqstatus=`/etc/init.d/rabbitmq-server status | grep "\[{pid"`
    rabbitmqpid=`echo $rabbitmqstatus | sed "s/.*,\(.*\)\}.*/\1/"`
fi
echo "RabbitMQ PID: $rabbitmqpid"
echo "$rabbitmqpid" > /var/run/rabbitmq.pid
Something went wrong with that request. Please try again.