[rabbitmq-discuss] Using init.d vs upstart script on EC2 image
Reza Lotun
rlotun at gmail.com
Fri Jul 16 15:40:01 BST 2010
Hi All,
I currently have a RabbitMQ node deployed on EC2. I used your 64-bit
image from here:
http://www.rabbitmq.com/ec2.html
The default setup for this image works. However, I noticed that the
config scripts use a standard /etc/init.d init script. Since you're on
ubuntu, I'd suggest using an upstart (http://upstart.ubuntu.com)
config - mainly because it allows respawning processes. So, if the
queue broker dies for whatever reason, upstart can be configured to
automatically restart it.
A simple example config:
---
description "RabbitMQ Server"
author "RabbitMQ"
start on runlevel 2
start on runlevel 3
stop on runlevel 0
stop on runlevel 1
stop on runlevel 4
stop on runlevel 5
stop on runlevel 6
exec /usr/sbin/rabbitmq-multi start_all 1 >
/var/log/rabbitmq/startup_log 2> /var/log/rabbitmq/startup_err
respawn
----
And then to use it:
cp rabbitmq-server.conf /etc/init
sudo initctl reload-configuration
sudo start rabbitmq-server
Has anyone else done something similar?
Cheers,
Reza
--
Reza Lotun
mobile: +44 (0)7521 310 763
email: rlotun at gmail.com
work: reza at tweetdeck.com
twitter: @rlotun
More information about the rabbitmq-discuss
mailing list