diff options
| author | Michael Bridgen <mikeb@lshift.net> | 2009-12-18 15:36:58 +0000 |
|---|---|---|
| committer | Michael Bridgen <mikeb@lshift.net> | 2009-12-18 15:36:58 +0000 |
| commit | 21b9b3d0d7c337fd562e2d03610a7fd8ea1b03dc (patch) | |
| tree | 28a5906c4f5c68d165ef45c30e89f30aa57e2e56 /packaging/common | |
| parent | c706e4f9d3daebd9ed992e3280ff2b0b921af347 (diff) | |
| parent | d74a371b279a99373f5580084879b5e12e2a8e62 (diff) | |
| download | rabbitmq-server-git-21b9b3d0d7c337fd562e2d03610a7fd8ea1b03dc.tar.gz | |
Merge no-pluggable-exchange branch into v1.7-series branch.
Diffstat (limited to 'packaging/common')
| -rw-r--r-- | packaging/common/rabbitmq-asroot-script-wrapper | 18 | ||||
| -rw-r--r-- | packaging/common/rabbitmq-script-wrapper | 6 | ||||
| -rw-r--r-- | packaging/common/rabbitmq-server.init | 2 |
3 files changed, 10 insertions, 16 deletions
diff --git a/packaging/common/rabbitmq-asroot-script-wrapper b/packaging/common/rabbitmq-asroot-script-wrapper index 9ef59ad76b..ee5947b66c 100644 --- a/packaging/common/rabbitmq-asroot-script-wrapper +++ b/packaging/common/rabbitmq-asroot-script-wrapper @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh ## The contents of this file are subject to the Mozilla Public License ## Version 1.1 (the "License"); you may not use this file except in ## compliance with the License. You may obtain a copy of the License at @@ -30,24 +30,16 @@ ## Contributor(s): ______________________________________. ## -# Escape spaces and quotes, because shell is revolting. -for arg in "$@" ; do - # Escape quotes in parameters, so that they're passed through cleanly. - arg=$(sed -e 's/"/\\"/g' <<-END - $arg - END - ) - CMDLINE="${CMDLINE} \"${arg}\"" -done - cd /var/lib/rabbitmq SCRIPT=`basename $0` if [ `id -u` = 0 ] ; then - /usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE} + /usr/lib/rabbitmq/bin/${SCRIPT} "$@" else - echo -e "\nOnly root should run ${SCRIPT}\n" + echo + echo "Only root should run ${SCRIPT}" + echo exit 1 fi diff --git a/packaging/common/rabbitmq-script-wrapper b/packaging/common/rabbitmq-script-wrapper index 0c4bd0a8d7..dfb714f16e 100644 --- a/packaging/common/rabbitmq-script-wrapper +++ b/packaging/common/rabbitmq-script-wrapper @@ -46,9 +46,13 @@ SCRIPT=`basename $0` if [ `id -u` = 0 ] ; then su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/${SCRIPT} ${CMDLINE}" +elif [ `id -u` = `id -u rabbitmq` ] ; then + /usr/lib/rabbitmq/bin/${SCRIPT} "$@" else /usr/lib/rabbitmq/bin/${SCRIPT} - echo -e "\nOnly root should run ${SCRIPT}\n" + echo + echo "Only root or rabbitmq should run ${SCRIPT}" + echo exit 1 fi diff --git a/packaging/common/rabbitmq-server.init b/packaging/common/rabbitmq-server.init index dc30597569..39d239835c 100644 --- a/packaging/common/rabbitmq-server.init +++ b/packaging/common/rabbitmq-server.init @@ -66,8 +66,6 @@ stop_rabbitmq () { $DAEMON stop_all > ${INIT_LOG_DIR}/shutdown_log 2> ${INIT_LOG_DIR}/shutdown_err RETVAL=$? if [ $RETVAL = 0 ] ; then - # Try to stop epmd if run by the rabbitmq user - pkill -u rabbitmq epmd || : [ -n "$LOCK_FILE" ] && rm -rf $LOCK_FILE else echo FAILED - check ${INIT_LOG_DIR}/shutdown_log, _err |
