From 76096e74d5fde3e657a420b9dc9fe53d5725c9eb Mon Sep 17 00:00:00 2001 From: Simon MacMullen Date: Wed, 26 Nov 2008 11:33:39 +0000 Subject: 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. --- packaging/debs/Debian/debian/rabbitmqctl_wrapper | 8 ++------ 1 file 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 -- cgit v1.2.1