diff options
| -rw-r--r-- | packaging/RPMS/Fedora/init.d | 8 | ||||
| -rw-r--r-- | packaging/debs/Debian/debian/init.d | 5 |
2 files changed, 9 insertions, 4 deletions
diff --git a/packaging/RPMS/Fedora/init.d b/packaging/RPMS/Fedora/init.d index 77a6a89af1..21019c7032 100644 --- a/packaging/RPMS/Fedora/init.d +++ b/packaging/RPMS/Fedora/init.d @@ -62,10 +62,12 @@ stop_rabbitmq () { if [ $RETVAL = 0 ] ; then $DAEMON stop_all > /var/log/rabbitmq/shutdown_log 2> /var/log/rabbitmq/shutdown_err RETVAL=$? - if [ $RETVAL != 0 ] ; then - echo FAILED - check /var/log/rabbitmq/shutdown_log, _err - else + if [ $RETVAL = 0 ] ; then + # Try to stop epmd if run by the rabbitmq user + pkill -u rabbitmq epmd || : rm -rf $LOCK_FILE + else + echo FAILED - check /var/log/rabbitmq/shutdown_log, _err fi else echo No nodes running diff --git a/packaging/debs/Debian/debian/init.d b/packaging/debs/Debian/debian/init.d index a35a60ec68..4a7909c5f0 100644 --- a/packaging/debs/Debian/debian/init.d +++ b/packaging/debs/Debian/debian/init.d @@ -53,7 +53,10 @@ stop_rabbitmq () { if [ $RETVAL = 0 ] ; then $DAEMON stop_all > /var/log/rabbitmq/shutdown_log 2> /var/log/rabbitmq/shutdown_err RETVAL=$? - if [ $RETVAL != 0 ] ; then + if [ $RETVAL = 0 ] ; then + # Try to stop epmd if run by the rabbitmq user + pkill -u rabbitmq epmd || : + else echo FAILED - check /var/log/rabbitmq/shutdown_log, _err fi else |
