At home I have a powerful Linux computer with plenty of disk space which I use for storing lots of large files such as ISO images and for assisting with source package builds.
However, it is also a rather noisy, power-consuming computer, and because I don’t need it all the time (maybe once every 2 days) I decided to write a script which will monitor it, and shut it down if it’s
not being used.
So my result: a perl script which monitors for logged in users with “who” and for any active samba shares with “smbstatus”.
Download Jethro’s Automatic Shutdown Script
Read the start of the file for installation/configuration information, but it’s pretty simple. It also isn’t too complex, so if you know basic perl you can add support for other checks that may suit you (eg: NFS, CPU usage, etc).
Hope someone else finds this useful… :-)