Re: Checking length of time?

From: Alan Chandler (alan_at_chandlerfamily.org.uk)
Date: 10/18/04

  • Next message: Ritesh Raj Sarraf: "Re: Missing ttys with udev"
    To: debian-user@lists.debian.org
    Date: Mon, 18 Oct 2004 07:07:26 +0100
    
    

    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
    alan@chandlerfamily.org.uk
    First they ignore you, then they laugh at you,
     then they fight you, then you win. --Gandhi
    -- 
    To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Ritesh Raj Sarraf: "Re: Missing ttys with udev"

    Relevant Pages

    • Checking length of time?
      ... I have set up a bare debian system that allows internet sharing through ... My ISP only allows 8 hours of a constant ... connection b4 they log you off. ...
      (Debian-User)
    • Re: Cant access secure Web pages
      ... With natd running it is ... Internet Sharing, paused a few seconds, and turned it back on again. ... attached to connect to the 'net any time I want a 'net connection. ...
      (uk.comp.sys.mac)
    • Re: Cant access secure Web pages
      ... when I had a working shared network connection. ... because I don't have Internet Sharing working with any ... I don't see natd running at all now (whatever ...
      (uk.comp.sys.mac)
    • Re: Why does My in-built Ethernet adaptor have 2 IP addresses ?
      ... How else would the Mac share its internet connection with another ... internet sharing connection means doing two things: ... You have to have _two_ networks, one public and one private ... email to oshea dot j dot j at gmail dot com. ...
      (comp.sys.mac.system)
    • Re: internet via firewire?
      ... I also tried sharing the internet connection over the firewire link but ... I couldn't get that to work (yes, I turned on internet sharing). ... this using my laptop connected to my wife's mini via firewire, ...
      (comp.sys.mac.system)