This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
connectivity_watchdog [2021/02/22 21:49] – edited for clarity hogwild | connectivity_watchdog [2024/03/02 18:03] (current) – Fix scheduler link hogwild | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Connectivity Watchdog ====== | ====== Connectivity Watchdog ====== | ||
- | You might want to monitor your Internet connectivity. The simplest way to do this is to run a custom task script | + | For various reasons, you might want to monitor your Internet connectivity. The simplest way to do this is to run a custom task script. The basic command structure might look something like this: |
- | The basic command would be something like: | + | For example, in the [[:admin-sched|Scheduler]] menu, in the** **//Custom 1 field:// |
- | **/ | + | \\ |
- | (8.8.4.4. is a google DNS server) which would cover the monitoring part without performing any action. | + | <code -> |
+ | /bin/ping -q -c1 8.8.4.4 | ||
+ | </ | ||
- | In order to link an action to a success (&& | + | \\ The 8.8.4.4. IP address is a google DNS server. This scheduled command would allow monitoring without requiring any further interaction with the user. |
- | For example: | + | 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 | ||
+ | |||
+ | # 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' | ||