Skip to content

Commit

Permalink
print extra newlines to clear old spidev5.1 errors faster
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleibrand committed Feb 22, 2017
1 parent 3b8d9e4 commit e4c80eb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bin/oref0-radio-reboot.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
radio_errors=`tail /var/log/openaps/pump-loop.log | grep "spidev5.1 already in use"`
if [ ! -z "$radio_errors" ]; then
logfile=/var/log/openaps/pump-loop.log
echo >> $logfile
echo -n "Radio error found at " | tee -a $logfile
date >> $logfile
echo "Radio error found" | tee -a $logfile
shutdown -r +5 "Rebooting to fix radio errors!" | tee -a $logfile
echo >> $logfile
else
if [ -e /run/nologin ]; then
echo "No more radio errors; canceling reboot" | tee -a $logfile
Expand Down

0 comments on commit e4c80eb

Please sign in to comment.