Skip to content

Commit

Permalink
Add mqtt to watchdog
Browse files Browse the repository at this point in the history
  • Loading branch information
roleoroleo committed Sep 21, 2024
1 parent 1500abc commit 167c321
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/static/static/home/yi-hack/script/wd_rtsp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,17 @@ check_rmm()
fi
}

check_mqtt()
{
# echo "$(date +'%Y-%m-%d %H:%M:%S') - Checking mqttv4 process..." >> $LOG_FILE
PS=`ps ww | grep mqttv4 | grep -v grep | grep -c ^`

if [ $PS -eq 0 ]; then
echo "check_mqtt failed, restart it!" >> $LOG_FILE
$START_STOP_SCRIPT mqtt start
fi
}

if [[ $(get_config RTSP) == "no" ]] ; then
exit
fi
Expand All @@ -137,6 +148,7 @@ do
check_rtsp_alt
fi
check_rmm
check_mqtt

echo 1500 > /sys/class/net/eth0/mtu
echo 1500 > /sys/class/net/wlan0/mtu
Expand Down

0 comments on commit 167c321

Please sign in to comment.