mirror of
https://github.com/sixfab/Sixfab_PPP_Installer
synced 2024-11-25 04:14:53 +00:00
i. Checks connection every 10s before auto reconnect.
ii. Pings Header only to save data.
This commit is contained in:
parent
c885071047
commit
0ba07617f0
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
|
|
||||||
ping -I ppp0 -c 1 8.8.8.8
|
ping -I ppp0 -c 1 8.8.8.8 -s 0
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Connection up, reconnect not required..."
|
echo "Connection up, reconnect not required..."
|
||||||
@ -11,5 +11,5 @@ while true; do
|
|||||||
sudo pon
|
sudo pon
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 10
|
||||||
done
|
done
|
||||||
|
@ -19,7 +19,7 @@ while true; do
|
|||||||
gpio -g write 24 0
|
gpio -g write 24 0
|
||||||
sleep 2
|
sleep 2
|
||||||
else
|
else
|
||||||
ping -I ppp0 -c 1 8.8.8.8
|
ping -I ppp0 -c 1 8.8.8.8 -s 0
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Connection up, reconnect not required..."
|
echo "Connection up, reconnect not required..."
|
||||||
@ -29,5 +29,5 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 10
|
||||||
done
|
done
|
||||||
|
@ -19,7 +19,7 @@ while true; do
|
|||||||
gpio -g write 11 0
|
gpio -g write 11 0
|
||||||
sleep 2
|
sleep 2
|
||||||
else
|
else
|
||||||
ping -I ppp0 -c 1 8.8.8.8
|
ping -I ppp0 -c 1 8.8.8.8 -s 0
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Connection up, reconnect not required..."
|
echo "Connection up, reconnect not required..."
|
||||||
@ -29,5 +29,5 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 10
|
||||||
done
|
done
|
||||||
|
@ -14,7 +14,7 @@ while true; do
|
|||||||
gpio -g write 26 0
|
gpio -g write 26 0
|
||||||
sleep 2
|
sleep 2
|
||||||
else
|
else
|
||||||
ping -I ppp0 -c 1 8.8.8.8
|
ping -I ppp0 -c 1 8.8.8.8 -s 0
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Connection up, reconnect not required..."
|
echo "Connection up, reconnect not required..."
|
||||||
@ -24,5 +24,5 @@ while true; do
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sleep 1
|
sleep 10
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user