aboutsummaryrefslogtreecommitdiff
path: root/docker/common
diff options
context:
space:
mode:
Diffstat (limited to 'docker/common')
-rw-r--r--docker/common/rabbitmq/config-rabbit.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/docker/common/rabbitmq/config-rabbit.sh b/docker/common/rabbitmq/config-rabbit.sh
index 750b253a4..29cd1bb06 100644
--- a/docker/common/rabbitmq/config-rabbit.sh
+++ b/docker/common/rabbitmq/config-rabbit.sh
@@ -44,7 +44,8 @@ function configure_rabbit {
elif [ "$RABBITMQ_SERVICE_HOST" ]; then
# work around:
# https://bugs.launchpad.net/ubuntu/+source/rabbitmq-server/+bug/653405
- echo "${RABBITMQ_SERVICE_HOST} `/usr/bin/hostname -s`" > /etc/hosts
+ HOSTNAME=`/usr/bin/hostname -s 2> /dev/null || /bin/hostname 2> /dev/null`
+ echo "${RABBITMQ_SERVICE_HOST} ${HOSTNAME}" > /etc/hosts
else
echo "You need RABBITMQ_SERVICE_HOST or RABBITMQ_CLUSTER_NODES & " \
" RABBITMQ_CLUSTER_COOKIES variables"