[rabbitmq-discuss] SIGTERM

Simon MacMullen simon at rabbitmq.com
Tue Mar 26 12:25:45 GMT 2013


On 26/03/13 12:16, Tim Watson wrote:
> Hi
>
> On 26 Mar 2013, at 05:25, carlhoerberg wrote:
>> exec /usr/lib/rabbitmq/bin/rabbitmq-server
>> post-start exec /usr/sbin/rabbitmqctl wait
>> pre-stop exec /usr/sbin/rabbitmqctl stop
>>
>
> The rabbitmqctl wait command takes the pid file as an argument. So
> this might not be as simple as it sounds.

Although if you are using the debian packages as a starting point, the 
pid file is just /var/run/rabbitmq/pid, so it's not much less simple.

Note that you are also running as root. So I would modify two lines:

post-start exec /usr/sbin/rabbitmqctl wait /var/run/rabbitmq/pid
pre-stop exec /usr/sbin/rabbitmqctl stop /var/run/rabbitmq/pid

Cheers, Simon

-- 
Simon MacMullen
RabbitMQ, VMware


More information about the rabbitmq-discuss mailing list