3 # apcupsd This shell script takes care of starting and stopping
4 # the apcupsd UPS monitoring daemon.
6 # chkconfig: 2345 20 99
7 # description: apcupsd monitors power and takes action if necessary
9 APCPID
=@PIDDIR@
/apcupsd.pid
10 APCLOCK
=@PIDDIR@
/apcupsd.lock
18 rm -f @PWRFAILDIR@
/powerfail
19 rm -f @nologdir@
/nologin
20 echo -n "Starting apcupsd power management"
21 @sbindir@
/apcupsd
--kill-on-powerfail ||
return=" Failed."
26 echo -n "Stopping apcupsd power management"
27 if [ -f ${APCPID} ]; then
28 THEPID
=`cat ${APCPID}`
29 kill ${THEPID} ||
return=" Failed."
42 @sbindir@
/apcaccess status
45 echo "Usage: $0 {start|stop|restart|status}"