Hi!
Ii can imagine this as a situation where you want the server to go down in case nobody is logged (even using the console, right?) for 30 minutes, right?
Maybe the easiest way is to create a script with this logic:
1 - How many people are logged into the system? If "0", I write a file somewhere.
2 - 30 minutesafter that, I check again if there is somebody logged into the system.
3 - If nobody, and the file exists, the poweroff the server.
4 - If anybody is logged, the file is deleted, and we wait for 30 minutes.
Item 1 is a simple script.
Item 2 is triggered by crontab.
Item 3 is the script from 1.
Item 4 too.
My 2 cents!
Best regards,
HeCSa.
|