Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jul 1st, 2006, 12:56 PM   #1
Delryn
Newbie
 
Join Date: Jul 2006
Posts: 3
Rep Power: 0 Delryn is on a distinguished road
help needed for internet lockout

Hey folks
I'm new to this forum, so try not to hurt me too much....I might like it and stick around

Anyway..
I'm trying my hand at bash scripting, starting with something that should be relatively simple.. Locking a teenage daughter out of the internet

I've kinda figured out the means of doing it
and the logistics of it
I just need a bit of help with the small things......
like coding it


Heres what I have at this point (I'll get to the actual questions at the end)

Variables:
- Status (another name may be more applicable)
0=out of time / grounded
1=default (X number of minutes per week)
2=school projects / good behavior (Y number of minutes added to X)
3=holidays (Z number of minutes replacing X)

- Schedule
a) restrictedstart (time of day when internet is denied to that user-probably 10pm)
b) restrictedend (when internet is allow again-probably 6am)
c)schoolstart (time of day that school starts - this would only affect mon-fri)
d)schoolend (I think you get the picture)

- TimeLeft
a clock/timer that counts down X

Using these variables pulled from a . file in the users $home
I figure that I can control the weekly duration online. I think that I have figured out most of the conditional factors with regards to the above variables. Not coded, just figured out.

At this point what I need help with is:
determining if there are any internet accessing programs currently running, I presume the info has to coaxed out of ifconfig?

how can I take the current time and tell if it falls within the restricted (7days a week) or the school (5days/week)

if you can point me in the right direction it would be greatly appreciated, if you post code can I ask for detail documentation (I'm a bit slow learning new commands)

Thanks

Last edited by Delryn; Jul 1st, 2006 at 1:07 PM.
Delryn is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 3:45 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC