You are not logged in.
I'm thinking of setting up an old laptop with a dead battery as a server. One of this issues I'm wondering about is if there is a way to have it safely shut down in the event of a power outage, so that there is no potential damage. I'm thinking that there must be a way to run a script that will detect if it is running on battery power (this device has about a 5 minute battery life, and I have no reason to justify replacing the battery as I have 2 other perfectly operational computers) and perform a system shutdown.
However that being said, my scripting abilities are in the N00b range, and I'm not really sure where to start with this. Any advice, would be greatly appreciated!
Last edited by fukin_jim (2014-01-26 07:37:57)
Offline
This seems appropriate for your use case: https://wiki.archlinux.org/index.php/Acpid
Offline
Thank you, I was thinking that that might be a good starting place, but I wasn't too sure. This project is weeks down the road, so I won't bother to update.
Offline
Why wouldn't you update? Part of being an Arch Linux user is keeping up with the fast paced bleeding edge repos. Waiting a week or two typically won't hurt, but getting in the habit of leaving your machine static like that can potentially come back and bite you. If you just stay on top of any *.pacnew files, you should be well aware of any configuration changes that might need your attention.
If you want to have a machine that you can not update for large swaths of time and more or less not think about, you might consider debian.
Offline
I meant updating this thread. I haven't even set up the machine yet...
Offline
I meant updating this thread. I haven't even set up the machine yet...
Okay. Now that statement makes a whole crap load more sense.
Offline