From 17965153eceb0af30d3edeccb26a10efce23fd6c Mon Sep 17 00:00:00 2001 From: Kroese Date: Wed, 3 May 2023 04:16:34 +0200 Subject: [PATCH] Connect to second NIC in DHCP mode --- run/check.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/run/check.sh b/run/check.sh index b721717..3c2d69a 100644 --- a/run/check.sh +++ b/run/check.sh @@ -3,16 +3,16 @@ set -u # Docker Healthcheck -PORT=5000 -FILE="/var/dsm.ip" +: ${DHCP:='N'} -if [ ! -f "${FILE}" ]; then - echo "IP not assigned" - exit 1 +if [ "$DHCP" = "Y" ]; then + PORT=5555 + IP="127.0.0.1" +else + PORT=5000 + IP="20.20.20.21" fi -IP=$(cat "${FILE}") - if ! curl -m 3 -ILfSs "http://${IP}:${PORT}/" > /dev/null; then echo "Failed to reach ${IP}:${PORT}" exit 1