Skip to content

Commit

Permalink
Update do_kafka_test to assign DOCKER_HOST_IP if not set
Browse files Browse the repository at this point in the history
  • Loading branch information
mwodahl committed Jan 5, 2024
1 parent 4aa0a99 commit f2c4c24
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions do_kafka_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f2c4c24

Please sign in to comment.