This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| connectivity_watchdog [2020/08/14 14:03] – created rs232 | connectivity_watchdog [2024/03/02 18:03] (current) – Fix scheduler link hogwild | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | Connectivity Watchdog | + | ======  | 
| - | You might  want to monitor your Internet connectivity.  | + | For various reasons, you might want to monitor your Internet connectivity.  | 
| - | The besic command would be something like: | + | For example, in the [[:admin-sched|Scheduler]] menu, in the** **//Custom 1 field:// | 
| - | **/ | + | \\ | 
| - | which however would not perform any action. | + | <code -> | 
| + | /bin/ping -q -c1 8.8.4.4 | ||
| + | </ | ||
| - | To perform an action linked to success (&& | + | \\ The 8.8.4.4. IP address is a google DNS server. This scheduled  | 
| - | Examples: | + | Next, in order to link an action to a success (&& | 
| - | **/bin/ping -q -c1 8.8.4.4 || / | + | \\ | 
| - | **/bin/ping -q -c1 8.8.4.4 || / | + | For example:  | 
| - | **/bin/ping -q -c1 8.8.4.4  | + | <code -> | 
| + | #if ping fails, restart the wan. | ||
| + | /bin/ping -q -c1 8.8.4.4 || /sbin/service wan restart | ||
| - | etc | + | # 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 && / | ||
| + | </ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | \\ | ||
| + | |||
| + | ===== Connectivity Watchdog Notes ===== | ||
| + | |||
| + | This script is a custom one. Please note that there is also a setting in FreshTomato' | ||