#!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Header: /var/cvsroot/gentoo-x86/app-admin/mon/files/mon.rc6,v 1.5 2005/01/16 08:27:22 dragonheart Exp $ depend() { need clock after logger } checkconfig() { if [ ! -e /etc/mon/mon.cf ] ; then eerror "You need an /etc/mon/mon.cf file to run mon" eerror "There is a sample at /etc/mon/mon.cf.sample" return 1 fi } start() { checkconfig || return 1 ebegin "Starting mon" start-stop-daemon --start --quiet --exec /usr/sbin/mon -- -P /var/run/mon.pid -f 1>&2 eend $? } stop() { ebegin "Stopping mon" start-stop-daemon --stop --quiet --pid /var/run/mon.pid 1>&2 eend $? }