summaryrefslogtreecommitdiff
path: root/packaging/debs
diff options
context:
space:
mode:
authorDavid Wragg <dpw@lshift.net>2009-08-11 12:14:37 +0100
committerDavid Wragg <dpw@lshift.net>2009-08-11 12:14:37 +0100
commit852d8cf253378cd965a6b0ed4dc295e2b0afb59c (patch)
treeff6d1ddbdc9ef92080e18e7111b245b6fa26a5ac /packaging/debs
parent4d019b5fc64e7643b76d691fdc084633a5bd4b58 (diff)
downloadrabbitmq-server-git-852d8cf253378cd965a6b0ed4dc295e2b0afb59c.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.d5
1 files changed, 4 insertions, 1 deletions
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