#!/bin/sh # # You probably want to set the path to include # nothing but local filesystems. # PATH=/bin:/usr/bin:/sbin:/usr/sbin export PATH MON=/root/mon-0.99.1/mon MONCONFIGDIR=/root/mon-0.99.1/etc MONSTATEDIR=/root/mon-0.99.1/state.d MONLOGDIR=/root/mon-0.99.1/log.d MONCMD=/root/mon-0.99.1/clients/moncmd case "$1" in start) if [ -x $MON ] then $MON -B $MONCONFIGDIR -D $MONSTATEDIR -L $MONLOGDIR -f fi ;; stop) if [ -x $MONCMD ] then $MONCMD term fi ;; *) echo "Usage: mon {start|stop}" exit 1 esac exit 0