#!/bin/sh
# $YakumoLabs$
#
# PROVIDE: mai
# REQUIRE: NETWORKING DAEMON

$_rc_subr_loaded . /etc/rc.subr

name="mai"
rcvar=$name
command="/usr/local/bin/mai"
command_args="-f /usr/local/etc/mai/mai.ini"
pidfile="/var/run/${name}.pid"
start_cmd="mai_start"

required_files="/usr/local/etc/mai/mai.ini"

mai_start() {
	$command $command_args
	pgrep -n $name > $pidfile
}

load_rc_config $name
run_rc_command "$1"
