diff --git a/files/start.sh b/files/start.sh index 33e8b76b7f875dd62c93aabae40322f71de9e49b..493ea80934220ed28e9599201355ea2bf042bb7a 100755 --- a/files/start.sh +++ b/files/start.sh @@ -12,7 +12,12 @@ rabbitmqctl add_user "$RABOTNIK_MESSAGE_BUS_USER" "$RABOTNIK_MESSAGE_BUS_PASSWOR rabbitmqctl set_user_tags "$RABOTNIK_MESSAGE_BUS_USER" administrator ; \ rabbitmqctl set_permissions -p / "$RABOTNIK_MESSAGE_BUS_USER" ".*" ".*" ".*" ; \ echo "*** User '$RABOTNIK_MESSAGE_BUS_USER' with password '$RABOTNIK_MESSAGE_BUS_PASSWORD' completed. ***" ; \ -echo "*** Log in the WebUI at port 15672 (example: http://localhost:15672) ***") & +echo "*** Log in the WebUI at port 15672 (example: http://localhost:15672) ***"; +for v in $RABOTNIK_MESSAGE_BUS_VHOSTS; do \ + rabbitmqctl add_vhost $v; \ + rabbitmqctl set_permissions -p $v "$RABOTNIK_MESSAGE_BUS_USER" ".*" ".*" ".*"; \ + echo "*** Created vhosts '$v' ***"; \ +done) & rabbitmq-plugins enable rabbitmq_mqtt # $@ is used to pass arguments to the rabbitmq-server command.