Quote:
Originally Posted by Ammad
i am confuse how do i set answer from ping of yahoo/google is down .
|
If none of the ping attempts work,
ping will return a non-zero exit code. So you could:
Code:
if ! ping -c 1 yahoo.com &> /dev/null && ! ping -c 1 google.com &> /dev/null; then
# add your routing changes here
fi
Make sure you limit the number of ping attempts with the
-c option, or the
ping command will never terminate.
Quote:
or
Any one knows best than this to set failover link.
|
I think there is a better way to do this, but it is beyond my knowledge.