1. Linux

  • Make sure that the computer is powered by an APC UPS.

  • Make sure that the computer is connected to an APC UPS.

  • Enter the following commands at a Command Line.

sudo apt-get install apcupsd
# Disable mails.
sudo chmod -x /etc/apcupsd/offbattery
sudo chmod -x /etc/apcupsd/onbattery
# Back up original file.
sudo cp -a /etc/default/apcupsd /etc/default/apcupsd.org
# Change "ISCONFIGURED=no" line into "ISCONFIGURED=yes".
sed -i 's/ISCONFIGURED=no/ISCONFIGURED=yes/' /etc/default/apcupsd
# Back up original file.
sudo cp -a /etc/apcupsd/apcupsd.conf /etc/apcupsd/apcupsd.conf.org
# Change the "UPSCABLE smart" line into "UPSCABLE usb".
# Change the "UPSTYPE apcsmart" line into UPSTYPE usb".
# Change the "DEVICE /dev/ttyS0" line into "DEVICE".
sed -i 's|UPSCABLE smart|UPSCABLE usb|'  /etc/apcupsd/apcupsd.conf
sed -i 's|UPSTYPE apcsmart|UPSTYPE usb|' /etc/apcupsd/apcupsd.conf
sed -i 's|DEVICE /dev/ttyS0|DEVICE|'     /etc/apcupsd/apcupsd.conf
# Restart UPS daemon.
sudo /etc/init.d/apcupsd start
sudo /etc/init.d/apcupsd restart
# Show status.
sudo apcaccess status