3 # apcupsd This shell script takes care of starting and stopping
4 # the apcupsd UPS monitoring daemon.
6 # chkconfig: 2345 60 99
7 # description: apcupsd monitors power and takes action if necessary
9 APCPID
=@PIDDIR@
/apcupsd.pid
11 DISTVER
=`cat /etc/yellowdog-release | grep release | cut -f 5 -d ' '`
13 # Source function libarary
14 .
/etc
/rc.d
/init.d
/functions
18 rm -f @PWRFAILDIR@
/powerfail
19 rm -f @nologdir@
/nologin
20 echo -n "Starting UPS monitoring:"
21 daemon @sbindir@
/apcupsd
-f @sysconfdir@
/apcupsd.conf
24 [ $RETVAL -eq 0 ] && touch @LOCKDIR@
/subsys
/apcupsd
27 echo -n "Shutting down UPS monitoring:"
31 rm -f @LOCKDIR@
/subsys
/apcupsd
39 @sbindir@
/apcaccess status
42 echo "Usage: $0 {start|stop|restart|status}"