Apcupsd – need shutdown (not kill)
I am using APC Back-UPS CS 650 with my pfsense. Now I got it working and apcupsd sees my ups and it halts system when powerdown with battery.
But what I needed is total shutdown system because I needed it power up when power is coming up –> when not home then system is going up without any access from me (or somebody else).
But I do not know how to do it - now it only halts system.
I don't know your UPS, but my experience with other UPSes is:
Upon line power loss, the system monitoring the UPS is informed about that event. The monitoring box remains running for the grace period (fpr example, 10 minutes).
If line power has not returned within the grace period, machines get shut down (that may include the monitoring machine). There will be a preset time to allow all machines to shut down (for example, 5 minutes).
At this point there a two options:
1. If line power remains offline, the UPS will eventually gt to the point where the battery runs flat and it will shutdown the output. When line power returns, the UPS will eventually restart the output and the machines will reboot-sfter-power-loss (as configured in the BIOS).
2. The line power returns before the UPS has shut down, this are a bit more interesting. Machines have been shut down already, but as they see no power loss, they will not reboot-after-power-loss. Ideally, the UPS would wait for the shutdown time period (5 minutes in my example), power cycle the outputs and everything is fine again.
Regardless: I let the pfSense box run until the UPS power fails (no automatic shutdown or anything). Same for the modem, PBX, switches and even a few of the WLAN APs. I am aware that this causes additional drain on the battery of the UPS even after the server machines have shut down, but what the heck? Plus, with a communication infrastructure left online until the very last second, all remaining systems can continue to yell for help.