diff options
author | David Wragg <dpw@lshift.net> | 2009-08-11 12:14:37 +0100 |
---|---|---|
committer | David Wragg <dpw@lshift.net> | 2009-08-11 12:14:37 +0100 |
commit | 6e279cd7b249aaf648d15bce65e9429d3c3f316f (patch) | |
tree | ff6d1ddbdc9ef92080e18e7111b245b6fa26a5ac /packaging/debs | |
parent | ea67ca82ef894396adc69ee6f7bdb7fa0d6f2e92 (diff) | |
download | rabbitmq-server-6e279cd7b249aaf648d15bce65e9429d3c3f316f.tar.gz |
When stopping rabbitmq server, kill any rabbitmq-owned epmd process
epmd is the Erlang Port Mapper Daemon, which maps Erlang node names to
TCP port numbers. It is shared by all users on a system, and started
automatically by the Erlang start-up script if not already running.
As a result, epmd will often be started when the rabbitmq server
starts, and so will be run as the rabbitmq user. This process will
linger even after the rabbitmq server is stopped.
This can have surprising consequences: The deluser program in Debian
Sid checks whether any processes owned by the given user are running,
and will fail if so.
This change addresses the problem in this init script. When stopping
the rabbitmq server, it will also kill any rabbitmq-owned epmd
process.
Diffstat (limited to 'packaging/debs')
-rw-r--r-- | packaging/debs/Debian/debian/init.d | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/packaging/debs/Debian/debian/init.d b/packaging/debs/Debian/debian/init.d index a35a60ec..4a7909c5 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 |