From f363bacc47fbf1899f62e01741a72ae015c41e09 Mon Sep 17 00:00:00 2001 From: lassulus Date: Fri, 24 May 2013 19:08:30 +0200 Subject: better internet check --- usr/bin/autowifi | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'usr/bin/autowifi') 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 -- cgit v1.2.3