freebsd-ports/dns/nsd/files/nsd.in
Dmitry Marakasov 4ae2b42965 - Add option to install Munun plugin
PR:		199798
Submitted by:	tgyurci@gmail.com
Approved by:	maintainer timeout
2015-05-18 17:44:32 +00:00

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"