xref: /netbsd-src/external/bsd/unbound/dist/contrib/rc_d_unbound (revision 3b6c3722d8f990f9a667d638078aee8ccdc3c0f3)
1*3b6c3722Schristos#!/bin/sh
2*3b6c3722Schristos#
3*3b6c3722Schristos# unbound freebsd startup rc.d script, modified from the named script.
4*3b6c3722Schristos# uses the default unbound installation path and pidfile location.
5*3b6c3722Schristos# copy this to /etc/rc.d/unbound
6*3b6c3722Schristos# and put unbound_enable="YES" into rc.conf
7*3b6c3722Schristos#
8*3b6c3722Schristos
9*3b6c3722Schristos# PROVIDE: unbound
10*3b6c3722Schristos# REQUIRE: SERVERS cleanvar
11*3b6c3722Schristos# KEYWORD: shutdown
12*3b6c3722Schristos
13*3b6c3722Schristos. /etc/rc.subr
14*3b6c3722Schristos
15*3b6c3722Schristosname="unbound"
16*3b6c3722Schristosrcvar=`set_rcvar`
17*3b6c3722Schristos
18*3b6c3722Schristosload_rc_config $name
19*3b6c3722Schristos
20*3b6c3722Schristoscommand="/usr/local/sbin/unbound"
21*3b6c3722Schristospidfile=${unbound_pidfile:-"/usr/local/etc/unbound/unbound.pid"}
22*3b6c3722Schristoscommand_args=${unbound_flags:-"-c /usr/local/etc/unbound/unbound.conf"}
23*3b6c3722Schristosextra_commands="reload"
24*3b6c3722Schristos
25*3b6c3722Schristosrun_rc_command "$1"
26