Skip to content

Commit

Permalink
write cancelation to logfile
Browse files Browse the repository at this point in the history
  • Loading branch information
scottleibrand committed Feb 23, 2017
1 parent 17f38b4 commit 7c0a559
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/oref0-radio-reboot.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
radio_errors=`tail /var/log/openaps/pump-loop.log | grep "spidev5.1 already in use"`
logfile=/var/log/openaps/pump-loop.log
if [ ! -z "$radio_errors" ]; then
if [ ! -e /run/nologin ]; then
logfile=/var/log/openaps/pump-loop.log
echo >> $logfile
echo -n "Radio error found at " | tee -a $logfile
date >> $logfile
Expand All @@ -11,6 +11,6 @@ if [ ! -z "$radio_errors" ]; then
else
if [ -e /run/nologin ]; then
echo "No more radio errors; canceling reboot" | tee -a $logfile
shutdown -c
shutdown -c | tee -a $logfile
fi
fi

0 comments on commit 7c0a559

Please sign in to comment.