Skip to content

Commit

Permalink
shut up the logs
Browse files Browse the repository at this point in the history
  • Loading branch information
fredclausen committed Sep 30, 2023
1 parent d053817 commit 81e5ab7
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions rootfs/usr/bin/adsbhub.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ myip4="0.0.0.0"
myip6="::"
cmin=0

shouldprint=1

while true; do

# Check connection and reconnect
Expand All @@ -23,11 +25,22 @@ while true; do
result="connected"
else
result="not connected"
shouldprint=1
eval "${cmd}" &
fi

echo "$result"

if [ "$result" == "connected" ]
then
if [ $shouldprint -eq 1 ]
then
shouldprint=0
echo "$result"
echo "Will not print this message again unless connection is lost"
fi
else
shouldprint=1
echo "$result"
fi

# Update IP if change
if [ -n "$ckey" ]
Expand Down Expand Up @@ -57,11 +70,11 @@ while true; do
myip6=$currentip6
echo "$result"
fi
fi
fi
fi
fi
fi
fi

sleep 60

done

0 comments on commit 81e5ab7

Please sign in to comment.