From 48c78c7f24cd9d6c7d75dd005b493376eedcf8a1 Mon Sep 17 00:00:00 2001 From: Tom Saul Date: Wed, 31 Jul 2019 14:53:04 -0700 Subject: [PATCH] Reduce logging for 'all good' check --- ppp_installer/reconnect_gprsshield | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/ppp_installer/reconnect_gprsshield b/ppp_installer/reconnect_gprsshield index 7cc54ec..d68f971 100644 --- a/ppp_installer/reconnect_gprsshield +++ b/ppp_installer/reconnect_gprsshield @@ -14,11 +14,9 @@ while true; do gpio -g write 26 0 sleep 2 else - ping -I ppp0 -c 1 8.8.8.8 -s 0 + ping -q -I ppp0 -c 1 8.8.8.8 -s 0 >/dev/null - if [ $? -eq 0 ]; then - echo "Connection up, reconnect not required..." - else + if [ $? -ne 0 ]; then echo "Connection down, reconnecting..." sudo pon fi