On 8/18/24 08:52, Walter Dnes wrote:
On Sun, Aug 18, 2024 at 07:00:52AM -0500, Dale wrote
Walter Dnes wrote:
   My current manual hibernation script is...

#!/bin/bash
sync
sudo /usr/sbin/hibernate

The one thing I wish I could figure out how to set up, once power
is lost, wait 2 minutes, maybe 5 minutes, then power off even if
the battery still has lots of power left.

   I asked Mr. Google.  APCUPSD has an ONBATTERDELAY command that does
something only if the battery is in use (i.e. AC power is off) for at
least a certain specified length of time..


I've been using apcupsd with Gentoo for ages, more than 20 years. apcupsd is able to do what you want but as far as I know, there's no apc.shutdown unit for systemd - this will also shutdown the UPS itself.

Another thing to be aware of is that APC has a new protocol for their newer UPSes and I've not tried a newer one with apcupsd to see if it is supported. This may be a concern and will likely need more investigation.

Dan


Reply via email to