#!/bin/sh # Exit immediately if any command fails set -e # Query the local health check endpoint HEALTH_URL="http://127.0.0.1:47880/health" response=$(curl -s -f "$HEALTH_URL") # Verify the response contains 'status' equal to 'ok' if echo "$response" | grep -q '"status":"ok"'; then exit 0 else echo "Health check failed: response: $response" exit 1 fi