Suspend to RAM script
Hi all,
I would like to use some tool or create a bash script that will suspend a computer when certain conditions are met, e.g no keyboard and mouse events for a defined period of time, no active ssh connection, defined process is not running, etc.
So my question is at first whether there is already such tool that enables this. If there is none, how can I watch the keyboard and mouse events? I was thinking of watching /proc/interrupts but I am not sure if this is the right way
Thanks for helping.
|