[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Checking if the network is up



Hi,

how about:

#!/bin/sh

if ! ping -c 3 known_address_which_is_in_etc_hosts | grep -q "round-trip"
	then
		do_your_stuff
fi

We use this to check our leased line every 5 mins.

Maarten

_______________________________________________________________________
| Maarten Boekhold, Faculty of Electrical Engineering TU Delft,   NL  |
|   boekhold@cindy.et.tudelft.nl boekhold@gopher.library.tudelft.nl   |
|                  Take life as a party!                              |
-----------------------------------------------------------------------


Reply to: