#!/bin/sh # # start/stop the mon server # # You probably want to set the path to include # nothing but local filesystems. # # chkconfig: 2345 99 10 # description: mon system monitoring daemon # processname: mon # config: /etc/mon/mon.cf # pidfile: /var/run/mon.pid # PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting mon daemon: " /usr/lib/mon/mon -f -c /etc/mon/mon.cf evaluate_retval echo touch /var/lock/subsys/mon ;; stop) echo -n "Stopping mon daemon: " killproc mon echo rm -f /var/lock/subsys/mon ;; status) status mon ;; restart) $0 stop $0 start ;; *) echo "Usage: mon {start|stop|status|restart}" exit 1 esac exit 0