test-access.sh 747 B

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/bash
  2. # Test rapide de l'accès à WaouW
  3. echo "=== Test d'accès WaouW ==="
  4. # Obtenir l'IP du Pi
  5. IP=$(hostname -I | awk '{print $1}')
  6. echo "IP du Pi: $IP"
  7. # Test accès direct
  8. echo "Test accès direct (port 80)..."
  9. if curl -s --max-time 5 "http://$IP" >/dev/null; then
  10. echo "✅ Accès direct OK"
  11. else
  12. echo "❌ Accès direct KO"
  13. fi
  14. # Test API
  15. echo "Test API..."
  16. if curl -s --max-time 5 "http://$IP/api/health" >/dev/null; then
  17. echo "✅ API OK"
  18. else
  19. echo "❌ API KO"
  20. fi
  21. # Test Traefik
  22. echo "Test Traefik..."
  23. if curl -s --max-time 5 "http://$IP" | grep -q "WaouW\|frontend"; then
  24. echo "✅ Traefik OK - Interface accessible"
  25. else
  26. echo "❌ Traefik KO - Interface non accessible"
  27. fi
  28. echo "=== Fin du test ==="