Site Tools


connectivity_watchdog

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
connectivity_watchdog [2021/08/24 14:56] rs232connectivity_watchdog [2021/12/29 19:32] – [Notes about Connectivity Watchdog Script]-added link to Network menu hogwild
Line 9: Line 9:
 </code> </code>
  
-(8.8.4.4. is a google DNS server) which would cover the monitoring part without performing any action.+\\  (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 (&&) or failure (||) we will append the wanted condition and the command. In order to link an action to a success (&&) or failure (||) we will append the wanted condition and the command.
  
-For example:+ \\
  
-><code ->+For example: \\ 
 + 
 +<code ->
 #if ping fails, restart the wan. #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 || /sbin/service wan restart
 +
 # if ping fails, reboot the device. # if ping fails, reboot the device.
 /bin/ping -q -c1 8.8.4.4 || /sbin/reboot /bin/ping -q -c1 8.8.4.4 || /sbin/reboot
 +
 # successful pings will log "Internet Available" where ping failures will log "Internet unavailable". # successful pings will log "Internet Available" where ping failures will log "Internet unavailable".
-/bin/ping -q -c1 8.8.4.4 && /usr/bin/logger "Internet available" || /usr/bin/logger "Internet unavailable" +/bin/ping -q -c1 8.8.4.4 && /usr/bin/logger "Internet available" || /usr/bin/logger "Internet unavailable"
 </code> </code>
 +
 +
 +===== Notes about Connectivity Watchdog Script =====
 +
 +This script is a custom one. Please note that there is also a setting in the //Basic/[[:network|Network]]// menu of Tomato's web interface called "//Check Connections Every//". This feature performs similar functions, with some differences. It is not recommended to use both this watchdog script and the //Check Connections Every //function at the same time. The two functions may interfere with each other, with unknown results.
  
  
connectivity_watchdog.txt · Last modified: 2024/03/02 18:03 by hogwild