The logic is a bit crazy, and the whole purpose of this script is
questionable, but until we get rid of it, we've refactor it to make it
more obvious just how crazy it actually is.
[#149425921]
Signed-off-by: Gerhard Lazu <gerhard@rabbitmq.com>
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]