#!/bin/sh typeset -i timer=120 #This sets the time limit on ISP while [ 1 ] do if pidof pppd > /dev/null # Checks whether ppp is running or not then echo System message: pppd daemon running echo ${timer} minutes left until the timeout #Print out time left. timer=$(( timer-1 )) sleep 60 else echo System message: pppd not running, starting now wvdial /etc/wvdial.conf & # Start ppp with wvdial sleep 30 plog | grep IP > ~/iplog #Get the new IP address mail your_email_address < ~/iplog #Email it to your account. typeset -i timer=120 echo System message. Process pppd started, $timer minutes until timeout fi done