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 [ -f /etc/sysconfig/upsmon ] && . /etc/sysconfig/upsmon
19 # See how we are called.
22 # Check if the service is already running?
23 if [ ! -f /var/lock/subsys/upsmon ]; then
25 daemon upsmon $PROGRAM_ARGS
27 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/upsmon
29 msg_already_running "UPSmon"
33 if [ -f /var/lock/subsys/upsmon ]; then
36 rm -f /var/lock/subsys/upsmon
38 msg_not_running "UPSmon"
51 msg_usage "$0 {start|stop|restart|force-reload|status}"