To start apcupsd at boot time, you must edit
${SYSCONFDIR}/apcupsd/apcupsd.conf and add the following lines to
${SYSCONFDIR}/rc.local:
if [ -x ${PREFIX}/sbin/apcupsctl]; then
echo -n ' apcupsd'; ${PREFIX}/sbin/apcupsctl start
fi
This will start apcupsd and use ${SYSCONFDIR}/apcupsd/apcupsd.conf for
the configuration. The ${PREFIX}/sbin/apcupsctl script can be used to
start/stop/restart apcupsd.
For more correct shutdown you should add following lines to
${SYSCONFDIR}/rc.shutdown script:
if [ -f ${SYSCONFDIR}/apcupsd/powerfail ]; then
echo
echo "APCUPSD will now power off the UPS"
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
See http://www.apcupsd.com, apcupsd(8) and apctest(8) for more
information. Note an old age of offline manuals.