APC UPS Daemon
|Source Repository:||Repository:Gentoo Portage Tree|
Summary: APC UPS daemon with integrated network-based remote shutdown
Keychain 2.8.2 ReleasedKeychain 2.8.2, a maintenance and bug fix release, is now available.
Unfork Tree is Live!The "unfork" tree is now merged into the main Funtoo Linux tree, and Funtoo Linux is now using shards for core packages, x11 (including media libraries), KDE, GNOME, python and perl.
OpenSSH 7 Disables DSA Keys By DefaultPlease be aware of this important change to avoid getting locked out of your Funtoo server.
APC UPS Daemon
"Apcupsd can be used for power mangement and controlling most of APC's UPS models on Unix and Windows machines. Apcupsd works with most of APC's Smart-UPS models as well as most simple signalling models such a Back-UPS, and BackUPS-Office. During a power failure, apcupsd will inform the users about the power failure and that a shutdown may occur. If power is not restored, a system shutdown will follow when the battery is exhausted, a timeout (seconds) expires, or runtime expires based on internal APC calculations determined by power consumption rates. Apcupsd is licensed under the GPL version 2." 
Emerge sys-power/acpupsd (package not on wiki - please add):
# emerge apcupsd
Configuration and Runlevel Registration
Edit your /etc/apcupsd/apcupsd.conf properly.
To start apcupsd, run the following:
# /etc/init.d/apcupsd start
To add apcupsd to the appropriate runlevels, execute the following commands:
# rc-update add apcupsd default * service apcupsd added to runlevel default # rc-update add apcupsd.powerfail shutdown * service apcupsd added to runlevel shutdown
Check UPS status
Finally, to check on the status of acpupsd, run the following:
# apcaccess status # tail -f /var/log/apcupsd.events