#!/bin/sh

# $FreeBSD$
#
# PROVIDE: ncftpd
# REQUIRE: DAEMON
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable ncftpd:
#
# ncftpd_enable="YES"
# ncftpd_flags="-dq"	# Not required
# ncftpd_config="/path/to/general.cf /path/to/domain.cf" # Not required

. /etc/rc.subr

name="ncftpd"
rcvar=ncftpd_enable

load_rc_config $name
: ${ncftpd_enable:="NO"}
: ${ncftpd_flags:="-dq"}
: ${ncftpd_config:="/usr/local/etc/ncftpd/general.cf /usr/local/etc/ncftpd/domain.cf"}

command=/usr/local/sbin/${name}
required_files="${ncftpd_config}"
command_args="${ncftpd_flags} ${ncftpd_config}"

run_rc_command "$1"
