check-health 164 B

1234567891011
  1. #!/bin/bash
  2. OK=$(curl --silent http://127.0.0.1:81/api/ | jq --raw-output '.status')
  3. if [ "$OK" == "OK" ]; then
  4. echo "OK"
  5. exit 0
  6. else
  7. echo "NOT OK"
  8. exit 1
  9. fi