Document amqp-relation-changed a bit

This commit is contained in:
Adam Gandelman 2011-07-18 17:44:57 -07:00
parent 144d2a3f1a
commit 5a8fea4472
1 changed files with 4 additions and 0 deletions

View File

@ -51,6 +51,10 @@ function install_hook() {
}
function amqp_changed() {
# Connecting clients should request a username.
# In reponse, we generate a password for new users,
# grant the user access on the default vhost "/",
# and tell it where to reach us.
RABBIT_USER=`relation-get username`
[[ -z $RABBIT_USER ]] && exit 0
PASSWD_FILE="/var/run/ensemble/$RABBIT_USER.passwd"