![]() ![]() | ![]() |
File: [local] / ports / sysutils / apcupsd / pkg / Attic / MESSAGE-main (download)
Revision 1.3, Mon May 18 03:51:50 2009 UTC (15 years, 1 month ago) by yason
update to latest version |
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 2>&1 > /dev/null 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