summaryrefslogtreecommitdiff
path: root/packaging/common/rabbitmq-script-wrapper
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/common/rabbitmq-script-wrapper')
-rw-r--r--packaging/common/rabbitmq-script-wrapper6
1 files changed, 5 insertions, 1 deletions
diff --git a/packaging/common/rabbitmq-script-wrapper b/packaging/common/rabbitmq-script-wrapper
index 0c4bd0a8..dfb714f1 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