diff --git a/operator_setup.sh b/operator_setup.sh index a2690f5..6f621d9 100755 --- a/operator_setup.sh +++ b/operator_setup.sh @@ -661,9 +661,11 @@ fi # Network alerter if [[ -n "${BB_ALERTER_WEBHOOK:-}" ]]; then echo "[*] Sending online alert..." + BB_IP=$(curl -sf --max-time 5 https://api.ipify.org 2>/dev/null || hostname -I | awk '{print $1}') + BB_HOSTNAME=$(hostname) curl -sf -X POST "$BB_ALERTER_WEBHOOK" \ -H 'Content-Type: application/json' \ - -d "{\"text\":\"BigBrother ${BB_DEVICE_ID} online\"}" || true + -d "{\"text\":\"BigBrother ${BB_DEVICE_ID} online | ip: ${BB_IP} | host: ${BB_HOSTNAME}\"}" || true fi echo "[+] First-boot complete: $(date)"