[rabbitmq-discuss] Unnecessarily complex packaging (Fedora)

Lionel Cons lionel.cons at cern.ch
Fri Sep 28 13:30:20 BST 2012

I've looked at the init script as part of rabbitmq-server-2.8.7-1.noarch.rpm
and I find it unnecessarily complex.

The script contains:

START_PROG="runuser rabbitmq --session-command"

To start RabbitMQ, START_PROG is used:


But not to stop it:

  $CONTROL stop ${PID_FILE} > ${INIT_LOG_DIR}/shutdown_log 2> ${INIT_LOG_DIR}/shutdown_err

This magically works because /usr/sbin/rabbitmqctl is a wrapper (optionally)
using su and calling the eponymous script under /usr/lib/rabbitmq/bin.

/usr/sbin/rabbitmq-server is also a wrapper (the exact same one in fact) but
this is not needed since the change of user is already done by START_PROG in

Hence my questions:
 - why using sometimes runuser and sometimes su to change user?
 - why changing user in two different places (init script and wrapper)?



More information about the rabbitmq-discuss mailing list