Wow, thats Kewl!

Thanks Robert, yes, that makes the code a little more portable!

In a similar vein, to make it truly run, and for being so good(!), how do I 
automate getting the WAN interface name (em0 dc0 etc) on 
different machines!?

Kind regards
David Hingston

----- Original Message ----- 
From: "Robert Huff" <[EMAIL PROTECTED]>
To: "Hinkie" <[EMAIL PROTECTED]>
Sent: Saturday, September 01, 2007 2:45 PM
Subject: Re: FreeBSD Cron Job to run (ifconfig em0 down; ifconfig em0 up)


> from edit.php create / write into new file /usr/bin/

ping -c1 Insert_1st_Gateway_Hop_Here_commonly_Static_IP_a.b.c.1
if [ $? -eq 2 ]; then
        ifconfig em0 down
        ifconfig em0 up
        echo 'Gateway Down'
        echo 'Gateway Up'

And you might consider replacing:

ping -c1 Insert_1st_Gateway_Hop_Here_commonly_Static_IP_a.b.c.1


ping -c1 `netstat -rn | head -n 5 | tail -n 1 | awk '{ print $2 }'`

Robert Huff 

_______________________________________________ mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to