summaryrefslogtreecommitdiff
path: root/packaging
diff options
context:
space:
mode:
Diffstat (limited to 'packaging')
-rw-r--r--packaging/debs/Debian/debian/rabbitmqctl_wrapper9
1 files changed, 8 insertions, 1 deletions
diff --git a/packaging/debs/Debian/debian/rabbitmqctl_wrapper b/packaging/debs/Debian/debian/rabbitmqctl_wrapper
index 75b37c0d6c..774731fc9e 100644
--- a/packaging/debs/Debian/debian/rabbitmqctl_wrapper
+++ b/packaging/debs/Debian/debian/rabbitmqctl_wrapper
@@ -10,5 +10,12 @@ for arg in "$@" ; do
done
cd /
-su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmqctl ${CMDLINE}"
+
+if [ ${UID} = 0 ] ; then
+ su rabbitmq -s /bin/sh -c "/usr/lib/rabbitmq/bin/rabbitmqctl ${CMDLINE}"
+else
+ /usr/lib/rabbitmq/bin/rabbitmqctl
+ echo -e "\nOnly root should run rabbitmqctl\n"
+ exit 1
+fi