Browse Source

Add creation of vhost and user to mq startup

master
Jan Dittberner 2 years ago
parent
commit
22217e06a3
  1. 13
      mq/startup.sh

13
mq/startup.sh

@ -3,5 +3,16 @@
set -e
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…
Cancel
Save