This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
connectivity_watchdog [2021/02/22 21:49] – edited for clarity hogwild | connectivity_watchdog [2021/12/29 19:32] – [Notes about Connectivity Watchdog Script]-added link to Network menu hogwild | ||
---|---|---|---|
Line 5: | Line 5: | ||
The basic command would be something like: | The basic command would be something like: | ||
- | **/****bin/ping -q -c1 8.8.4.4** | + | <code -> |
+ | /bin/ping -q -c1 8.8.4.4 | ||
+ | </ | ||
- | (8.8.4.4. is a google DNS server) which would cover the monitoring part without performing any action. | + | \\ |
In order to link an action to a success (&& | In order to link an action to a success (&& | ||
- | For example: | + | \\ |
- | **/bin/ping -q -c1 8.8.4.4 || / | + | For example: \\ |
- | **/bin/ping -q -c1 8.8.4.4 || /sbin/reboot** # if ping fails, reboot the device. | + | <code -> |
+ | #if ping fails, restart the wan. | ||
+ | /bin/ping -q -c1 8.8.4.4 || /sbin/service wan restart | ||
- | **/bin/ping -q -c1 8.8.4.4 && / | + | # if ping fails, reboot the device. |
+ | /bin/ping -q -c1 8.8.4.4 || / | ||
+ | |||
+ | # successful pings will log " | ||
+ | /bin/ping -q -c1 8.8.4.4 && / | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Notes about Connectivity Watchdog Script ===== | ||
+ | |||
+ | This script is a custom one. Please note that there is also a setting in the // | ||