Hi,
What is the most efficient way to detect (using terminal) if my internet connection is working. Returned result should be yes or no so I can use it in shell script conditioning and in case the answer is no (no internet connection) then I will command reboot.
Use case: My R-Pi is connected to internet via USB 3G modem. And roughly once in a week the modem from unknown reason disconnects. The solution is to reboot R-Pi because USB modem automatically connect to internet again.
What is the most efficient way to detect (using terminal) if my internet connection is working. Returned result should be yes or no so I can use it in shell script conditioning and in case the answer is no (no internet connection) then I will command reboot.
Use case: My R-Pi is connected to internet via USB 3G modem. And roughly once in a week the modem from unknown reason disconnects. The solution is to reboot R-Pi because USB modem automatically connect to internet again.