github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/pkg/executor/docker/gateway/health_check.sh (about) 1 #!/usr/bin/env bash 2 3 # Exit on error. Append || true if you expect an error. 4 set -o errexit 5 # Exit on error inside any functions or subshells. 6 set -o errtrace 7 # Do not allow use of undefined vars. Use ${VAR:-} to use an undefined VAR 8 set -o nounset 9 # Catch the error in case mysqldump fails (but gzip succeeds) in `mysqldump |gzip` 10 set -o pipefail 11 # Turn on traces, useful while debugging but commented out by default 12 #set -o xtrace 13 14 [ "$(curl --max-time 1 --output /dev/null --silent --header 'Docker-Health-Check: true' localhost:8080 --write-out '%{http_code}')" == "400" ]