I'm trying to write a Bash script that is aware of internet connectivity.
How can I achieve that?
if (something that checks internet connection);then curl -o new someurl else exit 1
Try using the
I was using snmp when I had a router that support it to get the ip assigned to the Wan interface (.253 was the router addr):
Or maybe you could webscarp it from the router's stat pages with curl.
Currently instead I use to check/get the ip from the service I use for the dynamic dns: