#!/usr/bin/env python3 """Liveness-check every catalog backend from CT148 before DNS flip.""" import subprocess, json # hostname -> (ip, port) ROUTES = { "pve": ("10.30.20.85", 8006), "gitea": ("10.30.20.149", 3000), "wiki": ("10.30.20.28", 3000), "CRM": ("10.30.20.30", 3000), "crm": ("10.30.20.30", 3000), "twenty": ("10.30.20.30", 3000), "webcheck": ("10.30.20.13", 3000), "mainagent": ("10.30.20.236", 5678), "agent": ("10.30.20.44", 3000), "btcpay": ("10.30.20.140", 80), "btc": ("10.30.20.140", 80), "torrent": ("10.30.20.87", 6969), "jelly": ("10.30.20.88", 8096), "spirit": ("10.30.20.32", 7777), "share": ("10.30.20.129", 3000), "snowshare": ("10.30.20.129", 3000), "snowshoer": ("10.30.20.129", 3000), "ai": ("10.30.20.240", 80), "tech": ("10.30.20.241", 80), "science": ("10.30.20.242", 80), "crypto": ("10.30.20.243", 80), "linux": ("10.30.20.244", 80), "gaming": ("10.30.20.246", 80), "diy": ("10.30.20.247", 80), "guides": ("10.30.20.248", 80), "digi-market": ("10.30.20.210", 5000), "cardvault-pro": ("10.30.20.211", 5000), "StreamPass-Hub": ("10.30.20.212", 5000), "KeyForge-Digital": ("10.30.20.213", 5000), "CoinBridgeMarket": ("10.30.20.214", 5000), "GiftShift": ("10.30.20.217", 5000), "PremiumPortal": ("10.30.20.218", 5000), "DigiDeals": ("10.30.20.219", 5000), "NexusKeys": ("10.30.20.220", 5000), "VaultPass": ("10.30.20.221", 5000), "PESTCONTROLLER": ("10.30.20.249", 5052), "aisearch": ("10.30.20.250", 8000), "signalsearcher": ("10.30.20.23", 5099), "tarot": ("10.30.20.77", 80), "socialpulse": ("10.30.20.252", 80), "fmd": ("10.30.20.181", 8443), "proxy": ("10.30.20.154", 3128), "proxy2": ("10.30.20.71", 3128), "proxy3": ("10.30.20.189", 3128), "purehydro": ("10.30.20.24", 80), "bwt.democracyrisingbwt.us": ("10.30.20.229", 8008), } dead = [] for host, (ip, port) in ROUTES.items(): r = subprocess.run(["curl", "-sk", "--max-time", "4", "-o", "/dev/null", "-w", "%{http_code}", f"http://{ip}:{port}/"], capture_output=True, text=True) code = r.stdout.strip() ok = code and code != "000" and code != "404" print(f"{host:24s} {ip}:{port} -> {code} {'OK' if ok else '*** CHECK ***'}") if not ok: dead.append((host, ip, port)) print() print("DEAD/BAD:", dead if dead else "none — all backends answer")