Comment 29 for bug 1634572

Revision history for this message
Lucas Sandery (lucas+-) wrote :

I got around this by creating (and of course doing chmod +x on) a script at /lib/systemd/system-shutdown/apcups-killpower

#!/bin/sh
if [ "$1" = "poweroff" -a -f /etc/apcupsd/powerfail ]; then
    /etc/apcupsd/apccontrol killpower
fi

Idea from https://wiki.archlinux.org/index.php/APC_UPS#Make_apcupsd_kill_UPS_power_once_the_hibernate_is_done
(with credit to djgera https://bbs.archlinux.org/viewtopic.php?pid=1354737#p1354737 and fsateler https://github.com/systemd/systemd/issues/4894#issuecomment-267372354)