The rabbitmq Fedora init script does not daemonize correctly (AFAICT). The current script also does not match the Debian daemonization (using start-stop-daemon).<br><br>Following is a patch to use &quot;daemon&quot; to make it work (I think). I&#39;d appreciate any feedback. I&#39;m also not sure how to submit a pull/patch request so if this is not the right place to submit this please could someone point me to the right place. I cloned the code from <a href="http://hg.rabbitmq.com/rabbitmq-server">http://hg.rabbitmq.com/rabbitmq-server</a><br>
<br>Thanks much.<br><br>$ hg diff<br>diff -r 8792fb52db8a packaging/RPMS/Fedora/rabbitmq-server.init<br>--- a/packaging/RPMS/Fedora/rabbitmq-server.init��� Wed Sep 26 13:57:55 2012 +0100<br>+++ b/packaging/RPMS/Fedora/rabbitmq-server.init��� Wed Sep 26 11:44:21 2012 -0400<br>
@@ -10,8 +10,6 @@<br>�# Provides:��������� rabbitmq-server<br>�# Required-Start:��� $remote_fs $network<br>�# Required-Stop:���� $remote_fs $network<br>-# Default-Start:���� 3 4 5<br>-# Default-Stop:����� 0 1 2 6<br>�# Description:������ RabbitMQ broker<br>
�# Short-Description: Enable AMQP service provided by RabbitMQ broker<br>�### END INIT INFO<br>@@ -26,12 +24,16 @@<br>�INIT_LOG_DIR=/var/log/rabbitmq<br>�PID_FILE=/var/run/rabbitmq/pid<br>�<br>-START_PROG= # Set when building package<br>
+START_PROG=&quot;daemon --user=$USER&quot;<br>�LOCK_FILE=/var/lock/subsys/$NAME<br>�<br>�test -x $DAEMON || exit 0<br>�test -x $CONTROL || exit 0<br>�<br>+# Source function library for the &quot;daemon&quot; function<br>
+. /etc/rc.d/init.d/functions<br>+<br>+<br>�RETVAL=0<br>�set -e<br><br>