diff --git a/scripts/pm2-self-heal.sh b/scripts/pm2-self-heal.sh index 381a818..22e5726 100755 --- a/scripts/pm2-self-heal.sh +++ b/scripts/pm2-self-heal.sh @@ -5,6 +5,7 @@ # Field positions (awk -F'│'): $7=pid $8=uptime $9=restarts $10=status TELEGRAM_BOT_TOKEN="$(grep TELEGRAM_BOT_TOKEN /root/.pi/agent/extensions/telegram/.env 2>/dev/null | cut -d= -f2 || echo '')" +LOG="/root/pm2-self-heal.log" TELEGRAM_CHAT_ID="5822977936" notify_tg() { @@ -16,8 +17,6 @@ notify_tg() { -d "text=${msg}" \ -d "parse_mode=HTML" > /dev/null 2>&1 || true } - ALERTS="${ALERTS}$msg" -} # Log-only mode: replaced by prose contract pm2-self-heal.prose.md # Only alerts Telegram on actual failure (status != online)