mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-02-24 22:58:43 +01:00
#985 ad BlitzTUI restartcounter for debug
This commit is contained in:
parent
0feafcc861
commit
bfd8c23217
2 changed files with 20 additions and 0 deletions
|
@ -24,6 +24,7 @@ echo "_background.sh STARTED"
|
||||||
|
|
||||||
# global vars
|
# global vars
|
||||||
blitzTUIHeartBeatLine=""
|
blitzTUIHeartBeatLine=""
|
||||||
|
blitzTUIRestarts=0
|
||||||
|
|
||||||
counter=0
|
counter=0
|
||||||
while [ 1 ]
|
while [ 1 ]
|
||||||
|
@ -169,6 +170,11 @@ do
|
||||||
#echo "latestHeartBeatLine(${latestHeartBeatLine})"
|
#echo "latestHeartBeatLine(${latestHeartBeatLine})"
|
||||||
if [ "${blitzTUIHeartBeatLine}" == "${latestHeartBeatLine}" ]; then
|
if [ "${blitzTUIHeartBeatLine}" == "${latestHeartBeatLine}" ]; then
|
||||||
echo "FAIL - still no new heart beat .. restarting BlitzTUI"
|
echo "FAIL - still no new heart beat .. restarting BlitzTUI"
|
||||||
|
blitzTUIRestarts=$(($blitzTUIRestarts +1))
|
||||||
|
if [ $(sudo cat /home/admin/raspiblitz.info | grep -c 'blitzTUIRestarts=') -eq 0 ]; then
|
||||||
|
echo "blitzTUIRestarts=0" >> /home/admin/raspiblitz.info
|
||||||
|
fi
|
||||||
|
sudo sed -i "s/^blitzTUIRestarts=.*/blitzTUIRestarts=${blitzTUIRestarts}/g" /home/admin/raspiblitz.info
|
||||||
sudo init 3 ; sleep 2 ; sudo init 5
|
sudo init 3 ; sleep 2 ; sudo init 5
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
|
|
@ -248,6 +248,20 @@ if [ ${lndRunning} -eq 1 ]; then
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# touchscreen statistics
|
||||||
|
if [ "${touchscreen}" == "1" ]; then
|
||||||
|
echo "blitzTUIActive=1"
|
||||||
|
if [ ${#blitzTUIRestarts} -gt 0 ]; then
|
||||||
|
echo "blitzTUIRestarts=${blitzTUIRestarts}"
|
||||||
|
else
|
||||||
|
echo "blitzTUIRestarts=0"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "blitzTUIActive=0"
|
||||||
|
echo "blitzTUIRestarts=0"
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# check if online if problem with other stuff
|
# check if online if problem with other stuff
|
||||||
|
|
||||||
# info on scan run time
|
# info on scan run time
|
||||||
|
|
Loading…
Add table
Reference in a new issue