-getting rabbitmq pid should now work for all future Ubuntu versions
This commit is contained in:
parent
6166d1d590
commit
7664146519
1 changed files with 4 additions and 3 deletions
|
@ -4,12 +4,13 @@
|
|||
#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" == "oneiric" ];
|
||||
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/"`
|
||||
else
|
||||
rabbitmqpid=`sed "s/.*,\(.*\)\}.*/\1/" /var/lib/rabbitmq/pids`
|
||||
fi
|
||||
echo "RabbitMQ PID: $rabbitmqpid"
|
||||
echo "$rabbitmqpid" > /var/run/rabbitmq.pid
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue