[rabbitmq-discuss] SIGTERM
carlhoerberg
carl.hoerberg at gmail.com
Tue Mar 26 14:51:07 GMT 2013
Yes, $PID_FILE and "normal exit 0" was important, without "normal exit" the process would be respawned as soon as it was stopped in pre-stop.
description "RabbitMQ Server"
start on runlevel [2345]
stop on runlevel [016]
kill timeout 60
respawn
respawn limit 10 5
normal exit 0
console log
setuid rabbitmq
setgid rabbitmq
env HOME=/var/lib/rabbitmq
env PID_FILE=/var/run/rabbitmq/pid
exec /usr/lib/rabbitmq/bin/rabbitmq-server
post-start exec /usr/sbin/rabbitmqctl wait $PID_FILE
pre-stop exec /usr/sbin/rabbitmqctl stop $PID_FILE
Thanks!
On Tuesday 26 March 2013 at 21:15, Simon MacMullen-2 [via RabbitMQ] wrote:
> On 26/03/13 13:09, Tim Watson wrote:
> > On 26 Mar 2013, at 12:25, Simon MacMullen wrote:
> > > 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
> >
> >
> > Doesn't the previous setuid/setgid deal with that?
>
> Argh; I wrote the "Note that" before noticing the setuid/setgid, then
> failed to delete it. Please ignore.
>
> Cheers, Simon
>
> --
> Simon MacMullen
> RabbitMQ, VMware
> _______________________________________________
> rabbitmq-discuss mailing list
> [hidden email] (/user/SendEmail.jtp?type=node&node=25728&i=0)
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>
>
> If you reply to this email, your message will be added to the discussion below: http://rabbitmq.1065348.n5.nabble.com/SIGTERM-tp25695p25728.html
> To unsubscribe from SIGTERM, click here (http://rabbitmq.1065348.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=25695&code=Y2FybC5ob2VyYmVyZ0BnbWFpbC5jb218MjU2OTV8LTEyNDcxMDc4NjM=).
> NAML (http://rabbitmq.1065348.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml)
--
View this message in context: http://rabbitmq.1065348.n5.nabble.com/SIGTERM-tp25695p25732.html
Sent from the RabbitMQ mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20130326/37744931/attachment.htm>
More information about the rabbitmq-discuss
mailing list