Skip to content
Snippets Groups Projects
Commit 06bdf6fc authored by MrMM's avatar MrMM
Browse files

just set TQ to '0' if there is no gatway. fixes #6

parent 46bd0884
No related branches found
No related tags found
No related merge requests found
...@@ -21,6 +21,12 @@ fi ...@@ -21,6 +21,12 @@ fi
#Is there an active Gateway? #Is there an active Gateway?
GATEWAY_TQ=`batctl gwl | grep "^=>" | awk -F'[()]' '{print $2}'| tr -d " "` #Grep the Connection Quality of the Gateway which is currently used GATEWAY_TQ=`batctl gwl | grep "^=>" | awk -F'[()]' '{print $2}'| tr -d " "` #Grep the Connection Quality of the Gateway which is currently used
if [ ! $GATEWAY_TQ ]; #If there is no gateway there will be errors in the following if clauses
then
GATEWAY_TQ=0 #Just an easy way to get an valid value if there is no gatway
fi
if [ $GATEWAY_TQ -gt $UPPER_LIMIT ]; if [ $GATEWAY_TQ -gt $UPPER_LIMIT ];
then then
echo "Gateway TQ is $GATEWAY_TQ node is online" echo "Gateway TQ is $GATEWAY_TQ node is online"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment