#!/bin/sh # $TheSupernovaDuo$ # # PROVIDE: mai # REQUIRE: DAEMON NETWORKING syslog # KEYWORD: shutdown . /etc/rc.subr name="mai" rcvar="mai_enable" load_rc_config $name : ${mai_enable:="NO"} : ${mai_config="/usr/local/etc/mai/mai.ini"} : ${mai_chdir="/usr/local/share/mai"} pidfile="/var/run/${name}.pid" command="/usr/sbin/daemon" procname="/usr/local/bin/${name}" mai_args="-f ${mai_config} -u www -g www" command_args="-S -m 3 -s info -l daemon -p ${pidfile} /usr/bin/env ${procname} ${mai_args}" required_files="${mai_config}" run_rc_command "$1"