diff options
author | Hubert Plociniczak <hubert@lshift.net> | 2008-12-05 11:45:06 +0000 |
---|---|---|
committer | Hubert Plociniczak <hubert@lshift.net> | 2008-12-05 11:45:06 +0000 |
commit | 3899353983d43254bfdf27331be5a6f8f84527d7 (patch) | |
tree | ca33887168814b35e01e730591a7898d630886c2 /packaging/RPMS | |
parent | 1298f2da3a29a3110a20c0c5e283d237b468ecb8 (diff) | |
download | rabbitmq-server-3899353983d43254bfdf27331be5a6f8f84527d7.tar.gz |
Display warning when rabbitmqctl is not run as superuser
Diffstat (limited to 'packaging/RPMS')
-rw-r--r-- | packaging/RPMS/Fedora/rabbitmqctl_wrapper | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/packaging/RPMS/Fedora/rabbitmqctl_wrapper b/packaging/RPMS/Fedora/rabbitmqctl_wrapper index 75b37c0d..0698ed13 100644 --- a/packaging/RPMS/Fedora/rabbitmqctl_wrapper +++ b/packaging/RPMS/Fedora/rabbitmqctl_wrapper @@ -10,5 +10,10 @@ 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 |