#!/sbin/openrc-run
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$

depend() {
	need capi
}

start() {
	ebegin "Starting capi forwarding daemon"
	start-stop-daemon --start --quiet --exec /usr/sbin/capifwd -- -p ${PORT}
	eend $?
}

stop() {
	ebegin "Stopping capi forwarding daemon"
	start-stop-daemon --stop --quiet --retry 5 --exec /usr/sbin/capifwd 
	eend $?
}