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
21 # See how we are called.
24 # Check if the service is already running?
25 if [ ! -f /var/lock/subsys/upsmon ]; then
28 [ "$?" -eq 0 ] && touch /var/lock/subsys/upsmon
30 msg_already_running "UPSmon"
34 if [ -f /var/lock/subsys/upsmon ]; then
37 rm -f /var/lock/subsys/upsmon
39 msg_not_running "UPSmon"
55 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"