#!/bin/bash
#
# keepalive.sh - Ridiculuously simple script to keep internetconnections alive.
#
# Copyright (C) 2002 Oskar Andreasson
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
# USA

PAGES=8
URLS[1]="www.bahnhof.se"
URLS[2]="www.google.com"
URLS[3]="www.sunet.se"
URLS[4]="www.yahoo.com"
URLS[5]="www.ebay.com"
URLS[6]="www.telia.com"
URLS[7]="www.nordea.se"
URLS[8]="www.frozentux.net"

loopwait=600

while true; do
	let "host = $RANDOM % $PAGES +1"
	echo "$host : ${URLS[$host]}"
	lynx -source $URLS[$host] 1> /dev/null 2> /dev/null
	sleep $loopwait 
done
