From 3877b3b50620c1fd4555debfbeb98ba682ea33a8 Mon Sep 17 00:00:00 2001 From: Alen Komic Date: Thu, 29 Oct 2015 17:34:25 +0100 Subject: [PATCH 1/2] Getting containers internal ip the easy way Getting containers internal ip the easy way --- bin/publish-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/publish-node.sh b/bin/publish-node.sh index bdcc32d..b6557e0 100644 --- a/bin/publish-node.sh +++ b/bin/publish-node.sh @@ -7,7 +7,7 @@ PUBLISH_NODE_TTL=${PUBLISH_NODE_TTL:-120} PUBLISH_NODE_POLL=${PUBLISH_NODE_POLL:-60s} NODE=$(cat /var/lib/rabbitmq/nodename) -HOST_IP=${HOST_IP:-$(/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}')} +HOST_IP=$(hostname -I | tr -d '[[:space:]]') while supervisorctl status rabbitmq-server | grep 'RUNNING' do From da3e12684c09c0a9563e5357eb49ccb3256f5e69 Mon Sep 17 00:00:00 2001 From: Alen Komic Date: Thu, 29 Oct 2015 17:40:20 +0100 Subject: [PATCH 2/2] Update publish-node.sh --- bin/publish-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/publish-node.sh b/bin/publish-node.sh index b6557e0..5899f04 100644 --- a/bin/publish-node.sh +++ b/bin/publish-node.sh @@ -7,7 +7,7 @@ PUBLISH_NODE_TTL=${PUBLISH_NODE_TTL:-120} PUBLISH_NODE_POLL=${PUBLISH_NODE_POLL:-60s} NODE=$(cat /var/lib/rabbitmq/nodename) -HOST_IP=$(hostname -I | tr -d '[[:space:]]') +HOST_IP=${HOST_IP:-$(hostname -I | tr -d '[[:space:]]')} while supervisorctl status rabbitmq-server | grep 'RUNNING' do