From f2c4c24823608b96db875216aaa57ad795f8805b Mon Sep 17 00:00:00 2001 From: Marc Wodahl Date: Thu, 4 Jan 2024 21:26:00 -0700 Subject: [PATCH] Update do_kafka_test to assign DOCKER_HOST_IP if not set --- do_kafka_test.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/do_kafka_test.sh b/do_kafka_test.sh index 0237bbca..806179dd 100755 --- a/do_kafka_test.sh +++ b/do_kafka_test.sh @@ -22,9 +22,9 @@ PPM_IMAGE_TAG=do-kafka-test-ppm-image PPM_IMAGE_NAME=jpo-cvdp_ppm setup() { - if [ -z $DOCKER_HOST_IP ]; then - echo "DOCKER_HOST_IP is not set. Exiting." - exit 1 + if [ -z $DOCKER_HOST_IP ] + then + export DOCKER_HOST_IP=$(ifconfig | grep -Eo 'inet (addr:)?([0-9]*\.){3}[0-9]*' | grep -Eo '([0-9]*\.){3}[0-9]*' | grep -v '127.0.0.1' | grep -v '10.*' | head -n 1) fi # print setup info