Files
ja4-platform/tests/integration/apache/platform/entrypoint.sh
toto dc6ffd6474 fix: tests intégration matrix — procps-ng, varnish h2, hitch ALPN, pgrep→ps
- Ajout de procps-ng dans les 4 Dockerfiles runtime (ps/pgrep disponibles)
- Remplacement de pgrep par ps -C dans tous les run-tests.sh
- Correction entrypoint nginx-varnish : pgrep nginx → cat nginx.pid (exit 127)
- Activation HTTP/2 dans Varnish : ajout de -p feature=+http2 dans les
  entrypoints nginx-varnish et hitch-varnish
- Restauration ALPN h2,http/1.1 dans hitch.conf (varnish supporte maintenant h2)
- Correction healthcheck hitch-varnish : curl sans --http1.1 (h2 fonctionnel)
- Correction requêtes phase_verify : http_logs_raw → http_logs, colonnes correctes
- Correction writer clickhouse.go : noms JSON alignés avec la MV (ip_meta_*, tls_sni…)
- Fix toStartOfSecond(DateTime) → toStartOfSecond(toDateTime64(col, 3))
- Retrait du SKIP el8/nginx-varnish (varnish s'installe bien sur AlmaLinux 8)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-04-12 01:29:01 +02:00

30 lines
1.1 KiB
Bash

#!/usr/bin/env bash
# =============================================================================
# entrypoint.sh — Stack Apache HTTPD + ja4ebpf
# Démarre Apache en foreground et lance ja4ebpf en arrière-plan.
# =============================================================================
set -euo pipefail
# Activer le module HTTP/2 si pas déjà chargé
if ! httpd -M 2>/dev/null | grep -q http2_module; then
echo "LoadModule http2_module modules/mod_http2.so" >> /etc/httpd/conf.modules.d/00-base.conf
fi
# Créer les répertoires de run nécessaires
mkdir -p /run/httpd /var/log/httpd
# Démarrer ja4ebpf en arrière-plan (optionnel : ne bloque pas le démarrage)
/usr/local/bin/ja4ebpf -config /etc/ja4ebpf/config.yml &
JA4_PID=$!
echo "[entrypoint] ja4ebpf démarré (PID $JA4_PID)"
# Laisser 3s pour détecter un échec immédiat (ex: verifier eBPF)
sleep 3
if ! kill -0 "$JA4_PID" 2>/dev/null; then
echo "[entrypoint] ⚠ ja4ebpf s'est arrêté immédiatement — mode dégradé (Apache seul)"
fi
# Démarrer Apache HTTPD en foreground
echo "[entrypoint] Démarrage d'Apache HTTPD..."
exec /usr/sbin/httpd -DFOREGROUND