Default RABBIT_HOST to be the SERVICE_HOST.

Using localhost for RABBIT_HOST can cause problems - particularly
on systems where IPv6 is partially broken and localhost resolves
to an IPv6 address.

The service should logically be running on SERVICE_HOST unless
otherwise overridden.

Change-Id: I6efb71b8b95174770066f38403d5d428ec88c3b6
This commit is contained in:
Bob Ball 2014-04-01 16:28:36 +01:00
parent 31f7475baf
commit e309e5a9f8

View File

@ -425,7 +425,7 @@ initialize_database_backends && echo "Using $DATABASE_TYPE database backend" ||
# Rabbit connection info
if is_service_enabled rabbit; then
RABBIT_HOST=${RABBIT_HOST:-localhost}
RABBIT_HOST=${RABBIT_HOST:-$SERVICE_HOST}
read_password RABBIT_PASSWORD "ENTER A PASSWORD TO USE FOR RABBIT."
fi