Sixfab_PPP_Installer/ppp_installer/reconnect_baseshield

14 lines
170 B
Plaintext
Raw Normal View History

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