mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-22 00:35:15 +00:00
22fe874022
PR: ports/187596 Submitted by: Jaap Akkerhuis <jaap@NLnetLabs.nl> (maintainer)
35 lines
578 B
Bash
35 lines
578 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:=%%PREFIX%%/etc/nsd/nsd.conf}
|
|
required_files=${config}
|
|
pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile ${config}`
|
|
command="%%PREFIX%%/sbin/${name}"
|
|
command_args="-c ${required_files}"
|
|
extra_commands="reload"
|
|
|
|
load_rc_config $name
|
|
|
|
run_rc_command "$1"
|
|
|