Skip to content

Commit

Permalink
Merge pull request #17 from zebrunner/develop
Browse files Browse the repository at this point in the history
1.0.1 hotfix
  • Loading branch information
vdelendik authored Jun 3, 2024
2 parents a0fcc3e + bd16adb commit 7618533
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,15 @@ fi


#### Healthcheck
logger "Connecting to ${WDA_HOST} ${MJPEG_PORT} using netcat..."
nc "${WDA_HOST}" "${MJPEG_PORT}"
logger "WARN" "${WDA_HOST} ${MJPEG_PORT} connection closed. Restarting."
while :; do
sleep $WDA_WAIT_TIMEOUT
curl -Is "http://${WDA_HOST}:${WDA_PORT}/status" | head -1 | grep -q '200 OK'
if [[ $? -eq 0 ]]; then
logger "Wda is healthy."
else
logger "ERROR" "WDA is unhealthy. Restarting."
break
fi
done

exit 1

0 comments on commit 7618533

Please sign in to comment.