#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: esd
# REQUIRE: LOGIN
#
esd_enable=${esd_enable-"NO"}
esd_pidfile=${esd_pidfile-"/var/run/esd.pid"}
command_args=${esd_flags-"-tcp -public -noterminate -nobeeps"}

. /etc/rc.subr

name=esd
rcvar=`set_rcvar`
command=/usr/local/bin/${name}

load_rc_config ${name}

pidfile=${esd_pidfile}
required_files=${esd_conffile}

start_cmd=esd_start

esd_start () {
	echo "Starting ${name}."
	/usr/sbin/daemon -p ${esd_pidfile} $command ${esd_flags} ${command_args}
	/bin/sleep 0.3
}

run_rc_command "$1"


