Internet Watchdog

Utilities and tools for networking, routers, setup etc
Post Reply
yiannis.zip
Novice
Novice
Posts: 35
Joined: Fri Dec 11, 2009 10:11 am

Internet Watchdog

Post by yiannis.zip » Fri Sep 27, 2013 3:04 pm

Does the firmware contain an internet watchdog functionality which I can enable?

I need this because some times, two or three times a week, my router gets disconected from the internet and needs a reboot to reconect.

I could write a script and put it in a cron job to execute every 10min, but the problem is that I cannot find a way to store anything in the filesystem because it is readonly.
This is the script I would like to execute:

Code: Select all

#!/bin/bash

/usr/bin/wget -q -s T 20 http://google.com
if [[ $? -eq 0 ]]; then
        echo "Online"
else
        echo "Offline"
        /sbin/reboot
fi
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Internet Watchdog

Post by thechief » Fri Sep 27, 2013 8:56 pm

Read the docs: "checksync"
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
yiannis.zip
Novice
Novice
Posts: 35
Joined: Fri Dec 11, 2009 10:11 am

Re: Internet Watchdog

Post by yiannis.zip » Sat Sep 28, 2013 12:20 pm

thechief wrote:Read the docs: "checksync"
Thanks, this is just what I was searching for. What parameters should I enter to make it run every 15 minutes?

Now it has "1 20". If I understand correctly that means that It will run once every hour, at 1:20, 2:20, 3:20 etc..
User avatar
thechief
RouterTech Team
RouterTech Team
Posts: 12067
Joined: Wed Feb 01, 2006 10:22 pm
Location: England, the Centre of Africa
Contact:

Re: Internet Watchdog

Post by thechief » Sat Sep 28, 2013 4:37 pm

"1 20" means it will run every 20 minutes. "1 15" means it will run every 15 minutes.
The Chief: :afro: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
Post Reply