#!/usr/bin/env bash set -euo pipefail # Health check for compose-syslog-smtp.yaml (DEVOPS-AIRGAP-58-001) COMPOSE_FILE="$(cd "$(dirname "$0")" && pwd)/compose-syslog-smtp.yaml" echo "Starting syslog+smtp stack..." docker compose -f "$COMPOSE_FILE" up -d echo "Waiting for health checks..." docker compose -f "$COMPOSE_FILE" wait >/dev/null 2>&1 || true echo "Current health status:" docker compose -f "$COMPOSE_FILE" ps echo "Sending test syslog message (UDP)..." logger -n 127.0.0.1 -P 514 -d "test syslog message $(date -u +%s)" echo "SMTP health endpoint:" curl -sf http://127.0.0.1:8025/api/v2/health || exit 1 echo "Done."