Require root or rabbitmq user for rabbitmq-plugins.

For some reason, the rabbitmq-plugins command could be run
from arbitrary user, which would result in errors unable to
access a cookie file or plugins configuration files.
Changed to work the same way as rabbitmqctl - require root
or rabbitmq user.

[Fixes #149425921]
This commit is contained in:
Daniil Fedotov 2017-07-24 17:50:11 +01:00
parent 18263db71c
commit 2c5f833d98
1 changed files with 1 additions and 1 deletions

View File

@ -31,7 +31,7 @@ if [ `id -u` = `id -u rabbitmq` -a "$SCRIPT" = "rabbitmq-server" ] ; then
. "$RABBITMQ_ENV"
exec /usr/lib/rabbitmq/bin/rabbitmq-server "$@" @STDOUT_STDERR_REDIRECTION@
elif [ `id -u` = `id -u rabbitmq` -o "$SCRIPT" = "rabbitmq-plugins" ] ; then
elif [ `id -u` = `id -u rabbitmq` ] ; then
if [ -f $PWD/.erlang.cookie ] ; then
export HOME=.
fi