Blockchain explorer for Ethereum based network and a tool for inspecting and analyzing EVM based blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
blockscout/bin/deployment/health_check

16 lines
329 B

#!/usr/bin/env bash
set -x
# Wait until an HTTP request succeeds against localhost:PORT
function ping_server(){
while true; do
if curl -sSf "http://localhost:${PORT:-80}" >/dev/null; then
exit 0
fi
done
}
# Timeout after 2 min if we still haven't gotten a response
timeout 120s ping_server