Created
January 12, 2014 22:40
-
-
Save jsalvet/8391636 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -z $1 ] | |
then | |
echo "Usage: `basename $0` username password" | |
exit 0 | |
fi | |
sudo -u rabbitmq rabbitmqctl add_user "$1" "$2" | |
sudo -u rabbitmq rabbitmqctl add_vhost "$1" | |
sudo -u rabbitmq rabbitmqctl set_permissions -p "$1" "$1" ".*" ".*" ".*" | |
echo "BROKER_URL = \"amqp://$1:[email protected]:5672/$1\"" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment