summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon MacMullen <simon@lshift.net>2008-11-26 11:33:39 +0000
committerSimon MacMullen <simon@lshift.net>2008-11-26 11:33:39 +0000
commit76096e74d5fde3e657a420b9dc9fe53d5725c9eb (patch)
tree48ed15f34fa1178c1b93ae559af0febc191d24c2
parenta9f4b665132ecd180480d7034aefe9b27e730cbd (diff)
downloadrabbitmq-server-bug19859.tar.gz
If the user is not root, just invoke rabbitmqctl without any args. Theybug19859
should always get the help message, and always get the "run as root" message.
-rw-r--r--packaging/debs/Debian/debian/rabbitmqctl_wrapper8
1 files changed, 2 insertions, 6 deletions
diff --git a/packaging/debs/Debian/debian/rabbitmqctl_wrapper b/packaging/debs/Debian/debian/rabbitmqctl_wrapper
index 32f677f5..774731fc 100644
--- a/packaging/debs/Debian/debian/rabbitmqctl_wrapper
+++ b/packaging/debs/Debian/debian/rabbitmqctl_wrapper
@@ -13,13 +13,9 @@ cd /
if [ ${UID} = 0 ] ; then
su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmqctl ${CMDLINE}"
-
-elif [ $# = 0 -o \( $# = 1 -a "$1" = --help \) ] ; then
- # Allow normal user to run for the help message
- /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmqctl ${CMDLINE}"
-
else
- echo "Only root should run $0"
+ /usr/lib/rabbitmq/bin/rabbitmqctl
+ echo -e "\nOnly root should run rabbitmqctl\n"
exit 1
fi