Koozali.org: home of the SME Server

Using cron to keep the link up

Holger

Using cron to keep the link up
« on: August 27, 2002, 01:17:51 AM »
My ISP connection goes down every 2 to 10 days. I haven't debugged the issue properly yet - partly because of lacking skills.

This is what I have done so far to fix the problem manualy, and it works every time:
/sbin/ifdown eth1
/sbin/ifup eth1

Now until (if ever) I get the issue debugged I would like cron to do the link toggling for me. And this where I would like some input. I'm new at bash scripts - so I hope someone has something similar lying around, which I can copy....?!

Some data:
ISP connection: cable modem
Static IP but obtained via dhcp (I suspect the problem is related to this...)

Holger

Re: Using cron to keep the link up
« Reply #1 on: August 27, 2002, 01:38:59 AM »
...and I forgot to mention. I would like to do this checking every 10 minutes.
And what is the "correct" to set up the this cron job? Using root crontab?