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
commit6fb949efbfedf9199d6e6bde8607529ac5cae931 (patch)
tree48ed15f34fa1178c1b93ae559af0febc191d24c2
parentda544ab66fe45080942d41504630308641ebd633 (diff)
downloadrabbitmq-server-git-6fb949efbfedf9199d6e6bde8607529ac5cae931.tar.gz
If the user is not root, just invoke rabbitmqctl without any args. They
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 32f677f509..774731fc9e 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