UPS hack.

C

Thread Starter

Curt Wuollet

Hi all

Here's a hack for using a low cost UPS to ensure proper shutdown for a Linux box used for automation. That's all it does. APC kinda supports Linux but their commercial product didn't work for me and their Open Source product didn't support UPS turnoff. And neither would work with the cables supplied. A call (and a 20 minute wait) got me someone who says this UPS won't do that. Some digging got me a site that has the Smart ups comms figured out so I wrote this to do what I want. As soon as you lose
power it execs shutdown -h now and 20 secs (or so) later theUPS shuts off. This way when power returns you get a normal restart. Since we only need less than a minute, a 280 VA UPS is more than enough.

regards

cww
 
Top