#!/bin/bash # Director NonReg Auto-Monitor — wired by Opus 9avr NR="/var/www/html/test-report/full-nonreg-results.json" if [ -f "$NR" ]; then FAILS=$(python3 -c "import json;d=json.load(open('$NR'));print(sum(1 for t in d['tests'] if t['status']=='fail'))" 2>/dev/null) if [ "$FAILS" -gt 0 ]; then MSG="NonReg ALERT: $FAILS FAIL detected" curl -sf -X POST "https://api.telegram.org/bot8544624912/sendMessage" -d "chat_id=7605775322&text=$MSG" > /dev/null 2>&1 fi fi # Director health ping curl -sf "https://weval-consulting.com/api/wevia-director.php?health" > /dev/null 2>&1