[plug] ADSL failover

Matt Kemner zombie at wasp.net.au
Wed Aug 22 16:26:24 WST 2001


On Wed, 22 Aug 2001, Simon Scott wrote:

> 	Actually, wouldnt ping return 0 on success and an error code on
> failure? Can you determine the return value through bash scripting?

I usually use something like

#!/bin/bash
if ! ping -qc1 $rem_ip >& /dev/null
then
  /usr/local/sbin/DialWasp
fi

although my current ChkModem script is just under 100 lines of Perl :)
It makes sure that if there is a problem dialing up, it will not cost the
customer a fortune in calls by redialing every minute

 - Matt




More information about the plug mailing list