summaryrefslogtreecommitdiff
path: root/packaging/common
diff options
context:
space:
mode:
authorMatthew Sackman <matthew@rabbitmq.com>2011-09-06 13:49:05 +0100
committerMatthew Sackman <matthew@rabbitmq.com>2011-09-06 13:49:05 +0100
commit483bacfd3a7615f5616143ff660ee065b225be02 (patch)
treef290e6b000174ee671a18f8645c1fe6b129b1d42 /packaging/common
parenta807c80810f79dfd6682c9d6b9f57a9425129655 (diff)
downloadrabbitmq-server-483bacfd3a7615f5616143ff660ee065b225be02.tar.gz
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
Diffstat (limited to 'packaging/common')
-rw-r--r--packaging/common/rabbitmq-server.init2
-rwxr-xr-xpackaging/common/rabbitmq-server.ocf2
2 files changed, 2 insertions, 2 deletions
diff --git a/packaging/common/rabbitmq-server.init b/packaging/common/rabbitmq-server.init
index 1bffc703..585fad51 100644
--- a/packaging/common/rabbitmq-server.init
+++ b/packaging/common/rabbitmq-server.init
@@ -80,7 +80,7 @@ stop_rabbitmq () {
RETVAL=$?
set -e
if [ $RETVAL = 0 ] ; then
- rm -f $PID_FILE
+ rm -rf `dirname $PID_FILE`
if [ -n "$LOCK_FILE" ] ; then
rm -f $LOCK_FILE
fi
diff --git a/packaging/common/rabbitmq-server.ocf b/packaging/common/rabbitmq-server.ocf
index a077ff16..0739008c 100755
--- a/packaging/common/rabbitmq-server.ocf
+++ b/packaging/common/rabbitmq-server.ocf
@@ -309,7 +309,7 @@ rabbit_stop() {
rabbit_status
rc=$?
if [ "$rc" = $OCF_NOT_RUNNING ]; then
- rm -f $RABBITMQ_PID_FILE
+ rm -rf `dirname ${RABBITMQ_PID_FILE}`
stop_wait=0
break
elif [ "$rc" != $OCF_SUCCESS ]; then