Open-Source API Development Ecosystem • https://hoppscotch.io • Offline, On-Prem & Cloud • Web, Desktop & CLI • Open-Source Alternative to Postman, Insomnia
TypeScript apiapi-clientapi-restapi-testingdeveloper-toolsgraphqlhttphttp-clientpwarestrest-apispatestingtesting-toolstoolsvuevuejswebsocket
chore: improve health check script (#4596)
progprnv56900d37acff
diff --git a/healthcheck.sh b/healthcheck.shindex c95076899..9b29906b8 100644--- a/healthcheck.sh+++ b/healthcheck.sh@@ -1,18 +1,17 @@-#!/bin/sh-curlCheck() {if ! curl -s --head "$1" | head -n 1 | grep -q "HTTP/1.[01] [23].."; thenecho "URL request failed!"- exit 1+ return 1elseecho "URL request succeeded!"+ return 0fi}if [ "$ENABLE_SUBPATH_BASED_ACCESS" = "true" ]; then- curlCheck "http://localhost:80/backend/ping"+ curlCheck "http://localhost:80/backend/ping" || exit 1else- curlCheck "http://localhost:3000"- curlCheck "http://localhost:3100"- curlCheck "http://localhost:3170/ping"+ curlCheck "http://localhost:3000" || exit 1+ curlCheck "http://localhost:3100" || exit 1+ curlCheck "http://localhost:3170/ping" || exit 1fi