More work on base install script
This commit is contained in:
parent
369b18cb98
commit
889112ca84
|
@ -313,10 +313,13 @@ RABBITMQ_USER=$(awk -F ' = ' '{if (! ($0 ~ /^;/) && $0 ~ /^user/ ) print $2}' ${
|
|||
RABBITMQ_PASSWORD=$(awk -F ' = ' '{if (! ($0 ~ /^;/) && $0 ~ /^password/ ) print $2}' ${AIRTIMEROOT}/airtime_mvc/build/airtime.example.conf)
|
||||
EXCHANGES="airtime-pypo|pypo-fetch|airtime-media-monitor|media-monitor"
|
||||
|
||||
# Ignore errors in this check to avoid dying when vhost isn't found
|
||||
set +e
|
||||
rabbitmqctl list_vhosts | grep -w ${RABBITMQ_VHOST}
|
||||
RESULT="$?"
|
||||
set -e
|
||||
|
||||
# Only run these if the user doesn't exist
|
||||
# Only run these if the vhost doesn't exist
|
||||
if [ "${RESULT}" != "0" ]; then
|
||||
verbose "\n * Creating RabbitMQ user ${RABBITMQ_USER}..."
|
||||
|
||||
|
@ -327,7 +330,7 @@ else
|
|||
fi
|
||||
|
||||
verbose "\n * Setting RabbitMQ user permissions..."
|
||||
loudCmd 'rabbitmqctl set_permissions -p ${RABBITMQ_VHOST} ${RABBITMQ_USER} "$EXCHANGES" "$EXCHANGES" "$EXCHANGES"'
|
||||
loudCmd "rabbitmqctl set_permissions -p ${RABBITMQ_VHOST} ${RABBITMQ_USER} \"$EXCHANGES\" \"$EXCHANGES\" \"$EXCHANGES\""
|
||||
|
||||
if [ ! -d "/etc/airtime" ]; then
|
||||
loud "\n-----------------------------------------------------"
|
||||
|
|
Loading…
Reference in New Issue