[plug] Linux support for schools

Matt Kemner zombie at wasp.net.au
Tue Sep 5 09:18:27 WST 2000


On Tue, 5 Sep 2000, Shackleton, Kevin wrote:

> Looks like both a cron to check the link is up and something in rc.local
> would do the job.  The script should not dial on the weekend of course.

I just have a script that runs from cron like thus:

* 6-17 * * 1-5  root    /root/bin/ChkModem
0 18   * * 1-5  root    killall pppd

ChkModem is basically a script that pings the other end of the link, and
if it fails, and it hasn't redialed too often recently, it redials.
No need to put something in rc.local that knows about time, because the
cron script takes care of that.
And any time the link drops out during the day, it will redial within the
minute.
 
> There's a loss of elegance in having the should-be-connected times in two
> locations (the everyday cron and the recovery technique).  I suppose I could
> make a single script containing the should-be-connected times and call that
> from rc.local and a frequently-called cron.

Just call it from cron. No need to have it anywhere else.

 - Matt




More information about the plug mailing list