![]() ![]() | ![]() |
File: [local] / ports / sysutils / apcupsd / pkg / Attic / MESSAGE-main (download)
Revision 1.2, Tue Jan 13 12:57:40 2009 UTC (15 years, 5 months ago) by yason
pretty output while starting daemon from rc.local |
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 See http://www.apcupsd.com, apcupsd(8) and apctest(8) for more information. Note an old age of offline manuals.