[BACK]Return to MESSAGE-main CVS log [TXT][DIR] Up to [local] / ports / sysutils / apcupsd / pkg

File: [local] / ports / sysutils / apcupsd / pkg / Attic / MESSAGE-main (download)

Revision 1.4, Wed Jun 3 04:09:00 2009 UTC (15 years ago) by yason
Branch: MAIN
Changes since 1.3: +1 -1 lines

pinky things

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 > /dev/null 2>&1
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