![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#1 |
|
Newbie
Join Date: Jul 2006
Posts: 3
Rep Power: 0
![]() |
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. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|