diff options
author | Simon MacMullen <simon@rabbitmq.com> | 2010-11-18 17:21:20 +0000 |
---|---|---|
committer | Simon MacMullen <simon@rabbitmq.com> | 2010-11-18 17:21:20 +0000 |
commit | ebaf3128f4a5a9e6eafeca3732e6ef13147bd7c9 (patch) | |
tree | cc04d611c08d377b2cac80abf31de16f1834c42d | |
parent | 5f7e24198de005dd24ef20f73299a6848c15dcde (diff) | |
download | rabbitmq-server-bug23522.tar.gz |
Allow people to run commands as non-root/rabbitmq if they have reconfigured stuff to allow this to happen.bug23522
-rw-r--r-- | packaging/common/rabbitmq-script-wrapper | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/packaging/common/rabbitmq-script-wrapper b/packaging/common/rabbitmq-script-wrapper index 79096a4e..5519dd82 100644 --- a/packaging/common/rabbitmq-script-wrapper +++ b/packaging/common/rabbitmq-script-wrapper @@ -49,10 +49,13 @@ if [ `id -u` = 0 ] ; then elif [ `id -u` = `id -u rabbitmq` ] ; then /usr/lib/rabbitmq/bin/${SCRIPT} "$@" else - /usr/lib/rabbitmq/bin/${SCRIPT} - echo - echo "Only root or rabbitmq should run ${SCRIPT}" - echo - exit 1 + /usr/lib/rabbitmq/bin/${SCRIPT} "$@" + VAL=$? + if [ $VAL -gt 0 ] ; then + echo + echo "Only root or rabbitmq should run ${SCRIPT}" + echo + fi + exit $VAL fi |