[rabbitmq-discuss] Ubuntu 11.10 does not shutdown

rwilson richard at mistraltech.co.uk
Fri Feb 24 10:02:15 GMT 2012



Sampo Savolainen-2 wrote:
> 
> 
> I've fixed this on my computers by changing /usr/sbin/rabbitmq-server to
> start rabbitmq with start-stop-daemon instead of su:
> 
> .. snip
> if [ `id -u` = `id -u rabbitmq` -o "$SCRIPT" = "rabbitmq-plugins" ] ; then
>     /usr/lib/rabbitmq/bin/${SCRIPT} "$@"
> elif [ `id -u` = 0 ] ; then
>     # don't use su, use start-stop-daemon instead
>     #su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT}
> ${CMDLINE}"
>     start-stop-daemon \
>         --chuid rabbitmq \
>         --start \
>         --pidfile $RABBITMQ_PID_FILE \
>         --exec /bin/sh \
>         -- /usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}
> else
> .. snap
> 
> 

Fixes it for me too, although start-stop-daemon wanted the parameters
re-ordered to:
...
    start-stop-daemon \
        --chuid rabbitmq \
        --start \
        --exec /bin/sh \
        --pidfile $RABBITMQ_PID_FILE \
        -- /usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}
...

Thanks
-- 
View this message in context: http://old.nabble.com/Ubuntu-11.10-does-not-shutdown-tp32853378p33383959.html
Sent from the RabbitMQ mailing list archive at Nabble.com.



More information about the rabbitmq-discuss mailing list