3 # Copyright 1999 American Power Conversion, All Rights Reserved
6 # msamson 01Apr99 For Linux, we have to remove upsoff.cmd, because we cannot
7 # remove this file once all filesystems have been unmounted
8 # in our shutdown script.
9 # msamson 04Oct99 Incorporated standard init fixes from Redhat
12 # chkconfig: 2345 98 92
13 # description: Uninterruptable Power Supply Monitoring Daemon
17 # Source function library.
18 . /etc/rc.d/init.d/functions
20 # Source networking configuration.
21 . /etc/sysconfig/network
23 # Demon specified configuration.
24 [ -f /etc/sysconfig/upsd ] && . /etc/sysconfig/upsd
26 PWRCHUTE=/usr/lib/powerchute
31 if [ -r /upsoff.cmd ]; then
35 # See how we were called.
38 # Check if the service is already running?
39 if [ ! -f /var/lock/subsys/upsd ]; then
44 if [ $RETVAL -eq 0 ]; then
45 touch /var/lock/subsys/upsd
48 msg_Already_Running UPSd
53 if [ -f /var/lock/subsys/upsd ]; then
56 rm -f /var/lock/subsys/upsd >/dev/null 2>&1
65 reload|force-reload|restart)
71 msg_Usage "$0 {start|stop|status|restart|reload|force-reload}"