Hi all,

When I first got internet service I was given three scripts.
Two worked fine, the third one doesn't.
I am planning a vaction and need to be able to keep my computer online
while I am away.

This is a script which needs to be run as a cron job.
I never bothered before now because I just manually check the
connection every so often.

but now I will be away.

So I need help to get the running:

Here it is:
1 #!/bin/sh
2 TESTHOST="198.133.219.25"       #Host to ping-test: cisco.com
3 STOPSCRIPT="/usr/sbin/ptstop"   #Script to stop a connection
4 STARTSCRIPT="/usr/sbin/ptstart" #Script to start a connection
5
6 [ -e /var/run/ptcron.pid ] || exit 0
7 touch /var/run/ptcron.pid
8 PING=`which ping`
9 GREP=`which grep`
10 SED=`which sed`
11 ALIVE=`$PING -c 1 -n $TESTHOST | $GREP 64\ bytes | $SED '/icmp/c\1'
12 `if [ "$ALIVE" == "1" ]; then
13              exit 0
14 fi
15 echo -e "Link is dead, reloading
16 "$STOPSCRIPT$STARTSCRIPTrm -f /var/run/ptcron.pid
17 exit 0

I already caught that line 6 dumps me to a promt...

Thanks for your help
Aaron

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to