I need a script for morning PC lockout, 7/365

Booting, installing, newbie
Post Reply
Message
Author
boof
Posts: 579
Joined: Wed 26 Sep 2012, 22:53

I need a script for morning PC lockout, 7/365

#1 Post by boof »

I need to break my internet & computer addiction by barring use of my computer between certain times of the day. I'd like to put a script in /root/startup. There is no need of a countdown timer/clock on screen. It will need to stop net connections, disable kbrd and mouse, save the current RAM contents to the .2sf file then shutdown. I will want to turn it off rather than leave it running. thx in advance.

User avatar
Barkin
Posts: 803
Joined: Fri 12 Aug 2011, 04:55

#2 Post by Barkin »


User avatar
ally
Posts: 1957
Joined: Sat 19 May 2012, 19:29
Location: lincoln, uk
Contact:

#3 Post by ally »

hey boof

does your router support this

mine has a power off setting for powersaving overnight for example

may be worth checking

:)

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#4 Post by 8-bit »

Since shutting down/power off shuts down the internet connection, couldn't you just make a short script that checks the time and if the time is between starting_disable time and Ending_disable time call poweroff to shut down the PC?
Settings would be saved normally as they are in a normal poweroff and I can see no reason to disable the mouse and keyboard as the script would in effect shut down the PC if the time was not an allowed time of running.

boof
Posts: 579
Joined: Wed 26 Sep 2012, 22:53

#5 Post by boof »

Dear 8-bit;

I don't know the programming syntax to do it, tho' I understand the idea.
That's why I posted the OP.

Post Reply