Index: head/dns/unbound/files/unbound.in =================================================================== --- head/dns/unbound/files/unbound.in (revision 470571) +++ head/dns/unbound/files/unbound.in (revision 470572) @@ -1,49 +1,50 @@ #!/bin/sh # # $FreeBSD$ # # unbound freebsd startup rc.d script, modified from the named script. # uses the default unbound installation path and pidfile location. # copy this to /etc/rc.d/unbound # and put unbound_enable="YES" into rc.conf # # unbound_anchorflags can be used to allow you to pass a custom flags to # unbound-anchor. Examples include a custom resolv.conf (-f) or a custom # root.hints (-r). Useful for when /etc/resolv.conf only contains 127.0.0.1 # PROVIDE: unbound # REQUIRE: SERVERS cleanvar # KEYWORD: shutdown . /etc/rc.subr name="unbound" rcvar=unbound_enable command="%%PREFIX%%/sbin/unbound" extra_commands="reload" start_precmd="start_precmd" -reload_precmd="%%PREFIX%%/sbin/unbound-checkconf ${unbound_conf} >/dev/null" load_rc_config $name pidfile=`%%PREFIX%%/sbin/unbound-checkconf -o pidfile ${unbound_conf}` unbound_enable=${unbound_enable:-"NO"} unbound_anchorflags=${unbound_anchorflags:-""} unbound_conf=${unbound_conf:-"%%ETCDIR%%/unbound.conf"} unbound_flags=${unbound_flags:-" -c ${unbound_conf}"} + +reload_precmd="%%PREFIX%%/sbin/unbound-checkconf ${unbound_conf} >/dev/null" start_precmd() { echo -n "Obtaining a trust anchor:" if [ "${unbound_anchorflags}T" = "T" ]; then su -m unbound -c %%PREFIX%%/sbin/unbound-anchor else su -m unbound -c "%%PREFIX%%/sbin/unbound-anchor ${unbound_anchorflags}" fi echo . %%PREFIX%%/sbin/unbound-checkconf ${unbound_conf} > /dev/null return $? } run_rc_command "$1"