To start apcupsd at boot time, edit /etc/apcupsd/apcupsd.conf
and add the following lines to /etc/rc.local:

if [ -x /usr/local/sbin/apcupsd ]; then
	echo -n ' apcupsd';       /usr/local/sbin/apcupsctl start
fi

To allow the system to be fully powered down (in order to preserve
UPS battery), add the following lines to /etc/rc.shutdown:

if [ -f /etc/apcupsd/powerfail ]; then
  echo
  echo "APCUPSD requested this system is powered down."
  echo
  powerdown=YES
  echo
  echo "Please ensure that the UPS has powered off before rebooting"
  echo "Otherwise, the UPS may cut the power during the reboot!!!"
  echo
fi
