#!/bin/sh

# $FreeBSD: ports/ftp/tftp-hpa/files/tftpd.in,v 1.3 2012/11/17 05:57:30 svnexp Exp $
#
# PROVIDE: tftpd
# REQUIRE: NETWORKING
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf to enable tftpd:
#
# tftpd_enable="YES"
#

. /etc/rc.subr

name="tftpd"
rcvar=tftpd_enable
pidfile=${tftpd_pidfile:-"/var/run/tftpd.pid"}
command="/usr/local/libexec/in.tftpd"
command_args="-P $pidfile -l"

load_rc_config $name
: ${tftpd_enable:="NO"}
: ${tftpd_flags:="-s /usr/local/tftp"}

run_rc_command "$1"
