#!/bin/sh

${RABBITMQCTL:="sudo rabbitmqctl"}
${RABBITMQ_PLUGINS:="sudo rabbitmq-plugins"}

# guest:guest has full access to /

$RABBITMQCTL add_vhost /
$RABBITMQCTL add_user guest guest
$RABBITMQCTL set_permissions -p / guest ".*" ".*" ".*"


$RABBITMQCTL add_vhost "rabbit/hole"
$RABBITMQCTL set_permissions -p "rabbit/hole" guest ".*" ".*" ".*"

#!/bin/sh

${RABBITHOLE_RABBITMQCTL:="sudo rabbitmqctl"}

# guest:guest has full access to /

$RABBITHOLE_RABBITMQCTL add_vhost /
$RABBITHOLE_RABBITMQCTL add_user guest guest
$RABBITHOLE_RABBITMQCTL set_permissions -p / guest ".*" ".*" ".*"


$RABBITHOLE_RABBITMQCTL add_vhost "rabbit/hole"
$RABBITHOLE_RABBITMQCTL set_permissions -p "rabbit/hole" guest ".*" ".*" ".*"

Use RABBITHOLE_RABBITMQCTL instead of RABBITMQCTL
Use RABBITHOLE_RABBITMQCTL instead of RABBITMQCTL

Overriding RABBITMQCTL system-wide has certain effect on RabbitMQ
when running it from source.
