Cleanup, README

This commit is contained in:
2017-11-13 12:08:23 +01:00
parent 410972b8ce
commit 092a79e484
13 changed files with 153 additions and 592 deletions
+13 -13
View File
@@ -1,18 +1,18 @@
#!/bin/bash
echo "$(date): Connect to Internet..."
#systemctl stop gammu-smsd
pon rnet
sleep 20
sleep 5
x=0
# Wait until connection is established
if ping -c 1 8.8.8.8 &>/dev/null ; then
echo "Already Connected - $(date)"
else
echo "Not Connected - $( date )"
echo "connecting wait ..."
sleep 20
fi
# Wir wollen sicher sein, dass die Verbindung steht...
ping -c 1 -w 30 8.8.8.8 >/dev/null
sleep 3
while ! ping -c 1 8.8.8.8 &>/dev/null ; do
echo "$(date): wait for internet connection to come up"
sleep 5
if [ $x -gt 10 ]; then
# Time out here
echo "$(date): Could not connect to internet (timeout)..."
exit 1
fi
x=$((x+1))
done
echo "$(date): Connected to Internet..."