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

Re: Checking if the network is up



> Is there any way of checking whether the network is responding so that I
> only run popclient when it is?

Try using `fping' on your network gateway host. e.g.:

  if fping -q $GWHOST
  then
    popclient ...
  fi

Or, if you prefer compactness (also good for crontabs):

  fping -q $GWHOST && popclient ...

Substituting $GWHOST with the name/address of your gateway, of course. Better
yet, substitute the name of your POP server.

-- 
Robert Leslie
rob@mars.org


Reply to: