Sixfab_PPP_Installer/ppp_installer/reconnect_baseshield

14 lines
170 B
Plaintext
Raw Normal View History

2018-10-15 17:58:48 +03:00
#!/bin/sh
2019-03-21 12:29:28 +03:00
while true; do
2018-10-15 17:58:48 +03:00
2019-07-31 14:48:18 -07:00
ping -q -I ppp0 -c 1 8.8.8.8 -s 0 >/dev/null
2018-10-15 17:58:48 +03:00
2019-07-31 14:48:18 -07:00
if [ $? -ne 0 ]; then
2018-10-15 17:58:48 +03:00
echo "Connection down, reconnecting..."
sudo pon
fi
sleep 10
2018-10-15 17:58:48 +03:00
done