Add creation of vhost and user to mq startup
This commit is contained in:
parent
adacf12078
commit
22217e06a3
1 changed files with 12 additions and 1 deletions
|
@ -3,5 +3,16 @@
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
rabbitmq-plugins enable --offline rabbitmq_management
|
rabbitmq-plugins enable --offline rabbitmq_management
|
||||||
su -s /bin/sh -c '/usr/sbin/rabbitmq-server' rabbitmq
|
su -s /bin/sh -c '/usr/sbin/rabbitmq-server' rabbitmq &
|
||||||
|
|
||||||
|
sleep 5
|
||||||
|
|
||||||
|
rabbitmqctl list_users --quiet | grep -q gnuviechadmin || \
|
||||||
|
rabbitmqctl add_user gnuviechadmin ${RABBITMQ_DEFAULT_PASS}
|
||||||
|
rabbitmqctl list_vhosts --quiet | grep -q "gva" || \
|
||||||
|
rabbitmqctl add_vhost gva
|
||||||
|
rabbitmqctl set_permissions --vhost gva gnuviechadmin '.*' '.*' '.*'
|
||||||
|
rabbitmqctl shutdown
|
||||||
|
|
||||||
|
sleep 2
|
||||||
|
su -s /bin/sh -c '/usr/sbin/rabbitmq-server' rabbitmq
|
Loading…
Reference in a new issue