#!/sbin/runscript # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License, v2 or later # $Header: $ depend() { need net } start() { ebegin "Starting monkeyd" /usr/bin/monkey -D start &>/dev/null eend $? } stop() { ebegin "Stopping monkeyd" /usr/bin/monkey stop &>/dev/null ec=$? eend $ec if [ $ec -ne 0 ]; then ebegin " Killing monkeyd" if [ -f "$pidfile" ]; then kill `cat "$pidfile"` &>/dev/null ec=$? rm -f "$pidfile" &>/dev/null eend $ec else # Mp pid file eend 1 fi fi }