aboutsummaryrefslogtreecommitdiffstats
path: root/dns/nsd/files/nsd.in
blob: 632ea4910a609d3312afb28d08b9cf57cb9b22ef (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
#
# $FreeBSD$
#
# PROVIDE: nsd
# REQUIRE: DAEMON
#
# Add the following line to /etc/rc.conf to enable nsd:
#
# nsd_enable="YES"
#

. /etc/rc.subr

name=nsd
rcvar=`set_rcvar`

required_files=%%PREFIX%%/etc/nsd/nsd.conf

command=%%PREFIX%%/sbin/${name}
pidfile=`%%PREFIX%%/sbin/nsd-checkconf -o pidfile %%PREFIX%%/etc/nsd/nsd.conf`

load_rc_config ${name}

nsd_enable=${nsd_enable-"NO"}

stop_cmd="nsd_stop"

nsd_stop()
{
    echo "Merging nsd zone transfer changes to zone files."
    %%PREFIX%%/sbin/nsdc patch

    sleep 5

    echo "Stopping nsd."
    %%PREFIX%%/sbin/nsdc stop
}

run_rc_command "$1"