K
2009-10-28 08:46:03 UTC
Is it possible to script a ping or similar to check if a remote host
responds and if it doesn't then launch a second script to perform certain
actions?
Alternatively, can the public IP (the one on the outside of my NAT) be
checked and if it's one IP do A but if it's another do B?
We have 2 internet feeds with twodifferent suppliers and hardware that
switches them over. Each has a different set of IP addresses and we need to
run some commands when it switches over, however we don't know if has
switched until it fails, an dwhen this happens out of hours it can cause
problems.
responds and if it doesn't then launch a second script to perform certain
actions?
Alternatively, can the public IP (the one on the outside of my NAT) be
checked and if it's one IP do A but if it's another do B?
We have 2 internet feeds with twodifferent suppliers and hardware that
switches them over. Each has a different set of IP addresses and we need to
run some commands when it switches over, however we don't know if has
switched until it fails, an dwhen this happens out of hours it can cause
problems.