3 # upsmon NUT daemon monitoring tool
5 # chkconfig: 2345 10 90
7 # description: upsmon talks to upsd and notifies of ups status changes, \
8 # also shutting systems down if required.
12 # Source function library.
13 . /etc/rc.d/init.d/functions
16 . /etc/sysconfig/network
19 [ -f /etc/sysconfig/upsmon ] && . /etc/sysconfig/upsmon
22 # See how we are called.
25 # Check if the service is already running?
26 if [ ! -f /var/lock/subsys/upsmon ]; then
30 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/upsmon
32 msg_already_running "UPSmon"
36 if [ -f /var/lock/subsys/upsmon ]; then
39 rm -f /var/lock/subsys/upsmon
41 msg_not_running "UPSmon"
54 msg_usage "$0 {start|stop|restart|force-reload|status}"