4NK_node/tests/connectivity/check_http_endpoints.sh
Nicolas Cantu 4b4d613073 Alignement DNS: migration .4nk.local vers .local
- Alignement hostname docker-compose.yml avec dnsmasq.conf
- Correction bitcoin.conf: remplacement .4nk.local par .local
- Mise à jour conf nginx, tor, sdk_relay vers .local
- Mise à jour tests connectivité pour .local
- Suppression module blindbit-orcacle (typo)
- Configuration dnsmasq pour résolution .local
- Correction permissions bitcoin.conf
2025-09-10 17:36:31 +02:00

50 lines
943 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
hostnames=(
tor.local
bitcoin.local
blindbit-oracle.local
sdk-storage.local
sdk-relay1.local
sdk-relay2.local
sdk-relay3.local
sdk-signer.local
ihm-client.local
miniback-postgres.local
coffre-front.local
coffre-back-mini.local
)
# Vérifier la résolution DNS via dnsmasq (127.0.0.1:5353)
for h in "${hostnames[@]}"; do
if nslookup -port=5353 "$h" 127.0.0.1 >/dev/null 2>&1; then
echo "DNS OK $h"
else
echo "DNS NOK $h"
fi
done
declare -A ports=(
[blindbit-oracle.local]=8000
[sdk-storage.local]=8080
[sdk-relay1.local]=8090
[sdk-relay2.local]=8090
[sdk-relay3.local]=8090
[sdk-signer.local]=9090
[ihm-client.local]=80
)
fail=0
for host in "${!ports[@]}"; do
url="http://$host:${ports[$host]}"
if wget --quiet --tries=1 --timeout=5 --spider "$url"; then
echo "HTTP OK $url"
else
echo "HTTP NOK $url"
fail=1
fi
done
exit $fail