summaryrefslogtreecommitdiffstats
path: root/usr/bin/autowifi
diff options
context:
space:
mode:
Diffstat (limited to 'usr/bin/autowifi')
-rwxr-xr-xusr/bin/autowifi7
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