--- /dev/null
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+DAEMON="/usr/sbin/monkey"
+CONFFILE="/etc/monkeyd/monkey.conf"
+
+depend() {
+ use net
+}
+
+start() {
+ ebegin "Starting monkeyd"
+ start-stop-daemon --start --exec "${DAEMON}" -- "-D" "${MONKEY_ARGS}" >/dev/null
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping monkeyd"
+ local PIDFILE=$(awk '/^ *PidFile/ { print $2 }' "${CONFFILE}")
+ start-stop-daemon --stop --quiet --pidfile "${PIDFILE}"
+ eend $?
+}
src_install() {
default
- newinitd "${FILESDIR}"/monkeyd.initd monkeyd
+ newinitd "${FILESDIR}"/monkeyd.initd-r1 monkeyd
newconfd "${FILESDIR}"/monkeyd.confd monkeyd
#move htdocs to docdir, bug #429632