4ae2b42965
PR: 199798 Submitted by: tgyurci@gmail.com Approved by: maintainer timeout
34 lines
573 B
Bash
34 lines
573 B
Bash
#!/bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: nsd
|
|
# REQUIRE: DAEMON
|
|
# REQUIRE: LOGIN
|
|
# KEYWORD: shutdown
|
|
#
|
|
# Add the following line to /etc/rc.conf to enable nsd:
|
|
#
|
|
# nsd_enable="YES"
|
|
#
|
|
|
|
. /etc/rc.subr
|
|
|
|
name=nsd
|
|
rcvar=nsd_enable
|
|
|
|
# read settings, set default values
|
|
load_rc_config "${name}"
|
|
: ${nsd_enable="NO"}
|
|
|
|
config=${nsd_config:=%%ETCDIR%%/nsd.conf}
|
|
required_files=${config}
|
|
pidfile=`%%PREFIX%%/sbin/nsd-checkconf -f -o pidfile ${config}`
|
|
command="%%PREFIX%%/sbin/${name}"
|
|
command_args="-c ${required_files}"
|
|
extra_commands="reload"
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|
|
|