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:
		
							parent
							
								
									18263db71c
								
							
						
					
					
						commit
						2c5f833d98
					
				|  | @ -31,7 +31,7 @@ if [ `id -u` = `id -u rabbitmq` -a "$SCRIPT" = "rabbitmq-server" ] ; then | ||||||
|     . "$RABBITMQ_ENV" |     . "$RABBITMQ_ENV" | ||||||
| 
 | 
 | ||||||
|     exec /usr/lib/rabbitmq/bin/rabbitmq-server "$@" @STDOUT_STDERR_REDIRECTION@ |     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 |     if [ -f $PWD/.erlang.cookie ] ; then | ||||||
|         export HOME=. |         export HOME=. | ||||||
|     fi |     fi | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue