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

depend() {
	need net
	after apache
	after apache2
}

start() {
	ebegin "Starting Mserv"
	start-stop-daemon --start -o -b --chuid mserv --exec /usr/bin/mserv -- \
		-r /var/spool/mserv -c /etc/mserv/config -p ${PORT}
	eend $?
}

stop() {
	ebegin "Stopping Mserv"
	start-stop-daemon --stop -o -q --exec /usr/bin/mserv
	eend $?
}