On Monday 18 October 2004 01:33, disciple wrote:
> I have set up a bare debian system that allows internet sharing through
> a dial up connection.  My ISP only allows 8 hours of a constant
> connection b4 they log you off.  I have 2 questions.
>
> 1. How do I check the status of the connection... ie the length of time
> that my debian box has been connected?

in the if-up scripts write the current date into a file  use the %s format on 
the date command (seconds since 1970)

>
> 2. How can I set my box up to automatically disconnect after say about
> 7.5 hours, and then reconnect?

run a cron job every 15 minutes which compares current time (as seconds since 
1970) with the time put into the date file above and take the connection down 
and up if the time is longer that 7.5 hours.


-- 
Alan Chandler
[EMAIL PROTECTED]
First they ignore you, then they laugh at you,
 then they fight you, then you win. --Gandhi


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to