Sixfab_PPP_Installer/ppp_installer/reconnect_baseshield

16 lines
206 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-03-22 12:21:29 +03:00
ping -I ppp0 -c 1 8.8.8.8
2018-10-15 17:58:48 +03:00
if [ $? -eq 0 ]; then
echo "Connection up, reconnect not required..."
else
echo "Connection down, reconnecting..."
sudo pon
fi
sleep 1
done