OPNsense Forum

Archive => 23.7 Legacy Series => Topic started by: eponymous on August 02, 2023, 08:48:40 PM

Title: Apcupsd plugin - tell UPS to remain off
Post by: eponymous on August 02, 2023, 08:48:40 PM
Hi

Is there any way to get APCUPSd to inform the UPS to power off and stay off, even when utility power returns?

I don't want my router to automatically power back up again after the UPS has switched off which seems to happen now.

E.
Title: Re: Apcupsd plugin - tell UPS to remain off
Post by: zz00mm on August 03, 2023, 03:02:48 AM
Have you looked at these resources?? I'm in the process of connecting a UPS to my firewall and found these resources after searching the forum finding very little. looks like you can achieve your desired configuration by modifying/creating a custom conf file.

https://linux.die.net/man/8/apcupsd

http://www.apcupsd.org/manual/
Title: Re: Apcupsd plugin - tell UPS to remain off
Post by: CJ on August 03, 2023, 05:56:00 PM
Do you need the UPS to stay off or can you just change the power setting in the bios not to resume on power?

Also, is there a reason you don't want the router to come back on?  Just curious as while I have my servers configured to stay off, I definitely want my router to come back on so that I can access the network remotely.
Title: Re: Apcupsd plugin - tell UPS to remain off
Post by: eponymous on August 03, 2023, 11:58:18 PM
I think I've found out how to do this. You can override any of the events that are listed in apccontrol with your own scripts which need to exit with a status of 99

What's odd is the killpower event has its actions commented out by default yet I'm sure the UPS went into hibernate.

Either way I just need to override the killpower event to do a —poweroff

Hope this helps others.