[oclug] Auto ifdown / ifup
jearle at nortelnetworks.com
Thu Feb 1 11:29:51 EST 2001
> Is there a way to either:
> -constantly ping the internet, and if it is down, to run a
> ifdown / ifup script, when the connection is restored,
You could schedule a cron job to run every 5mins or so, which calls the
host=<your gateway IP>
if ! ping -c 1 $host > /dev/null; then
# Can't reach gateway, assume link is dead and reset.
# We're good to go.
More information about the OCLUG