#!/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.6 2006/01/31 12:30:13 uberlord 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 --exec /usr/sbin/mon \ --pidfile /var/run/mod.pid \ -- -P /var/run/mon.pid -f eend $? } stop() { ebegin "Stopping mon" start-stop-daemon --stop --pidfile /var/run/mon.pid eend $? }