Skip to content

Commit 6e22a7a

Browse files
author
Matthew Sackman
committed
When we stop, wipe out the directory rather than just the pid file. This avoids having to worry about how to remove the directory on package uninstall and also has the advantage of helping non-rabbit-packaged distributions
1 parent 291c28b commit 6e22a7a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packaging/common/rabbitmq-server.init

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ stop_rabbitmq () {
8080
RETVAL=$?
8181
set -e
8282
if [ $RETVAL = 0 ] ; then
83-
rm -f $PID_FILE
83+
rm -rf `dirname $PID_FILE`
8484
if [ -n "$LOCK_FILE" ] ; then
8585
rm -f $LOCK_FILE
8686
fi

packaging/common/rabbitmq-server.ocf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ rabbit_stop() {
309309
rabbit_status
310310
rc=$?
311311
if [ "$rc" = $OCF_NOT_RUNNING ]; then
312-
rm -f $RABBITMQ_PID_FILE
312+
rm -rf `dirname ${RABBITMQ_PID_FILE}`
313313
stop_wait=0
314314
break
315315
elif [ "$rc" != $OCF_SUCCESS ]; then

0 commit comments

Comments
 (0)