Loading run/check.sh +10 −6 Original line number Diff line number Diff line Loading @@ -4,15 +4,19 @@ set -eu # Docker Healthcheck PORT=5000 IP="20.20.20.21" FILE="/var/dsm.ip" [ -f "$FILE" ] && IP=$(cat "${FILE}") if ! curl -m 3 -ILfSs "http://$IP:$PORT/"; then echo "Failed to reach $IP" if [ ! -f "${FILE}" ]; then echo "IP not assigned" exit 1 fi IP=$(cat "${FILE}") if ! curl -m 3 -ILfSs "http://${IP}:${PORT}/"; then echo "Failed to reach ${IP}" exit 1 fi echo "Healthcheck OK for $IP" echo "Healthcheck OK for ${IP}" exit 0 Loading
run/check.sh +10 −6 Original line number Diff line number Diff line Loading @@ -4,15 +4,19 @@ set -eu # Docker Healthcheck PORT=5000 IP="20.20.20.21" FILE="/var/dsm.ip" [ -f "$FILE" ] && IP=$(cat "${FILE}") if ! curl -m 3 -ILfSs "http://$IP:$PORT/"; then echo "Failed to reach $IP" if [ ! -f "${FILE}" ]; then echo "IP not assigned" exit 1 fi IP=$(cat "${FILE}") if ! curl -m 3 -ILfSs "http://${IP}:${PORT}/"; then echo "Failed to reach ${IP}" exit 1 fi echo "Healthcheck OK for $IP" echo "Healthcheck OK for ${IP}" exit 0