#!/bin/sh
# $TheSupernovaDuo$
#
# PROVIDE: mai
# REQUIRE: DAEMON NETWORKING syslog
# KEYWORD: shutdown


. /etc/rc.subr

name="mai"
rcvar="mai_enable"

load_rc_config $name

: ${mai_user:="www"}
: ${mai_enable:="NO"}
: ${mai_config="/usr/local/etc/mai/mai.ini"}

pidfile="/var/run/${name}.pid"
command="/usr/sbin/daemon"
procname="/usr/local/bin/${name}"
mai_args="-f ${mai_config}"
command_args="-S -m 3 -s info -l daemon -p ${pidfile} /usr/bin/env ${procname} ${mai_args}"

run_rc_command "$1"
