ports/ftp/tftp-hpa/files/tftpd.in
2024-06-10 13:28:03 +02:00

25 lines
462 B
Bash

#!/bin/sh
# 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="%%PREFIX%%/libexec/in.tftpd"
command_args="-P $pidfile -l"
load_rc_config $name
: ${tftpd_enable:="NO"}
: ${tftpd_svcj_options:="net_basic"}
: ${tftpd_flags:="-s %%PREFIX%%/tftp"}
run_rc_command "$1"