I'm a newbie and had some troubles using watchcat (the watchdog equivalent on the OpenWrt platform) to restart my router on connection loss.
Here the original post with my needs and some notes on my attempts.
watchdog needs 2 parameters (in "Restart on Internet connection loss" mode):
- Period -> which defines the longest period of time without internet access before a reboot is initiated
- Ping period -> which defines how often to check the Internet connection
I had mistakenly set ** Period ** to * 15 * and ** Ping Period ** to * 60 *
a simple checking with ** logread -e watchcat ** shown that something * gone wrong *
user.err watchcat: cfg08e014 restart program not started - pingperiod must be less than dot
The frequency of ping checks (Ping Period parameter) ** must not be less than or equal to but greater ** than the Internet connection loss timeout (Period parameter)
then setting ** Period ** to * 60 * and ** Ping Period ** to * 15 * and checking the results with ** logread -e watchcat ** I got:
user.info watchcat: task started (mode = ping; period = 60; pinghosts = 220.127.116.11; pingperiod = 15; forcedelay = 30)
Note that NO ERROR / WARNINGS were shown on the web interface or on starting the script from the command line [** / etc / init.d / watchcat restart **]
Maybe my mistake can help someone ...