الملفات
2026-07-28 15:54:03 +03:00

14 أسطر
207 B
Bash

#!/bin/bash
URL="http://localhost:5000/health"
STATUS=$(curl -s -o /dev/null -w "%{http_code}" "$URL")
if [ "$STATUS" -eq 200 ]; then
echo "Healthy"
exit 0
else
echo "Unhealthy"
exit 1
fi