I am trying to use upstart to keep a service running: rabbitmq-server.
I have written an upstart configuration file in /etc/init/rabbitmq.conf
1 2 start on runlevel  3 stop on runlevel  4 5 respawn 6 exec /etc/init.d/rabbitmq-server start
The problem is that this script thinks that rabbitmq-server has crashed right after it runs and it continues to try and restart it until upstart determines it has restarted too many times and ultimatly exits:
Aug 29 19:01:47 WORKER1 kernel: [ 1334.301258] init: rabbitmq main process ended, respawning Aug 29 19:01:48 WORKER1 kernel: [ 1334.740770] init: rabbitmq main process ended, respawning Aug 29 19:01:48 WORKER1 kernel: [ 1335.227660] init: rabbitmq main process ended, respawning Aug 29 19:01:49 WORKER1 kernel: [ 1335.721948] init: rabbitmq respawning too fast, stopped
How can I write an upstart script to keep a service running?