diff options
author | lassulus <lassulus@googlemail.com> | 2013-05-24 19:08:30 +0200 |
---|---|---|
committer | lassulus <lassulus@googlemail.com> | 2013-05-24 19:08:30 +0200 |
commit | f363bacc47fbf1899f62e01741a72ae015c41e09 (patch) | |
tree | 5a697ca30fa9c84ba5f2581b912d40dd7e7fb721 /usr/bin/autowifi | |
parent | 729eb44eca98c772c0def8a1cd41fa52763d0663 (diff) |
better internet check
Diffstat (limited to 'usr/bin/autowifi')
-rwxr-xr-x | usr/bin/autowifi | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/usr/bin/autowifi b/usr/bin/autowifi index 8c5a0101..28560797 100755 --- a/usr/bin/autowifi +++ b/usr/bin/autowifi @@ -103,7 +103,12 @@ check_gateway(){ ping -c 1 -w 5 $(ip route | awk '/default/{print $3}') } check_internet(){ - wget -O- --spider http://google.de/index.html + secret=$(wget -O- http://euer.krebsco.de/secret) + if [ "$secret" == "1337" ]; then + return 0 + else + return 1 + fi } loop_over_networks(){ . /tmp/${wifi}.scan |