mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
17867420bb
For all new features, see http://www.nlnetlabs.nl/svn/nsd/tags/NSD_4_0_0_REL/doc/NSD-4-features This version replaces the nsdc control program with nsd-control. This requires some manual setup with nsd-control-setup and editing of the config files. nsd-control is incompatible with nsdc so when that is used in scripts, these should be adapted. NSD 3 is still supported as dns/nsd3. PR: 183888 Submitted by: Jaap Akkerhuis <jaap@NLnetLabs.nl>
49 lines
732 B
Bash
49 lines
732 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=${name}_enable
|
|
|
|
required_files=%%PREFIX%%/etc/nsd/nsd.conf
|
|
|
|
command=%%PREFIX%%/sbin/nsd-control
|
|
command_args="start"
|
|
pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile %%PREFIX%%/etc/nsd/nsd.conf`
|
|
procname=%%PREFIX%%/sbin/${name}
|
|
|
|
load_rc_config ${name}
|
|
|
|
nsd_enable=${nsd_enable-"NO"}
|
|
|
|
extra_commands="reload"
|
|
reload_cmd="${name}_reload"
|
|
stop_cmd="${name}_stop"
|
|
|
|
nsd_reload()
|
|
{
|
|
echo "Reloading ${name}."
|
|
kill -HUP `cat $pidfile`
|
|
}
|
|
|
|
nsd_stop()
|
|
{
|
|
echo "Stopping ${name}."
|
|
kill -TERM `cat $pidfile`
|
|
}
|
|
|
|
run_rc_command "$1"
|
|
|