Files
deer-flow/watchdog.sh

10 lines
526 B
Bash
Executable File

#!/bin/bash
# DeerFlow watchdog - monitors main deerflow service only
# Sub-services (langgraph/gateway/frontend) are managed by deerflow.service directly
if ! systemctl is-active --quiet deerflow; then
systemctl restart deerflow
echo "$(date) RESTART deerflow" >> /opt/deer-flow/logs/watchdog.log
curl -s -X POST http://localhost:8065/hooks/pt54hzthf3b6pe6rgp1ionipnh -H "Content-Type: application/json" -d '{"text":"WATCHDOG: restarted deerflow (main service)","username":"DeerFlow Bot"}' > /dev/null 2>&1
fi