mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2024-11-20 02:09:15 +01:00
#985 fix background monitoring
This commit is contained in:
parent
f33af14951
commit
55111c37c2
@ -161,17 +161,17 @@ do
|
||||
|
||||
# check every 30sec
|
||||
recheckBlitzTUI=$(($counter % 30))
|
||||
if [ ${recheckBlitzTUI} -eq 1 ]; then
|
||||
echo "BlitzTUI Monitoring ..."
|
||||
if [ "${touchscreen}" == "1" ] && [ ${recheckBlitzTUI} -eq 1 ]; then
|
||||
echo "BlitzTUI Monitoring Check"
|
||||
latestHeartBeatLine=$(sudo tail -n 300 /home/pi/blitz-tui.log | grep beat | tail -n 1)
|
||||
if [ ${#blitzTUIHeartBeatLine} -gt 0 ]; then
|
||||
echo "blitzTUIHeartBeatLine(${blitzTUIHeartBeatLine})"
|
||||
echo "latestHeartBeatLine(${latestHeartBeatLine})"
|
||||
#echo "blitzTUIHeartBeatLine(${blitzTUIHeartBeatLine})"
|
||||
#echo "latestHeartBeatLine(${latestHeartBeatLine})"
|
||||
if [ "${blitzTUIHeartBeatLine}" == "${latestHeartBeatLine}" ]; then
|
||||
echo "FAIL - still no new heart beat .. restarting BlitzTUI"
|
||||
sudo init 3 ; sleep 2 ; sudo init 5
|
||||
else
|
||||
echo "OK - Beat changes since last period - BlitzTUI is alive"
|
||||
# echo "OK - Beat changes since last period - BlitzTUI is alive"
|
||||
fi
|
||||
else
|
||||
echo "blitzTUIHeartBeatLine is empty - skipping check"
|
||||
|
Loading…
Reference in New Issue
Block a user