1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-29 01:13:08 +00:00
freebsd-ports/dns/powerdns-recursor/files/pdns-recursor.in
Ralf van der Enden f008c3a2ef dns/powerdns-recursor: update to 4.5.2
rc.d script changes + cleanup deps

mark NOT_FOR_ARCHS=i386 since upstream no longer supports archs with
32bit time_t.

Changes: https://doc.powerdns.com/recursor/changelog/4.5.html#change-4.5.2

PR:		256530
Approved by:	maintainer
2021-06-11 09:51:14 -07:00

39 lines
982 B
Bash

#!/bin/sh
# PROVIDE: pdns_recursor
# REQUIRE: NETWORKING
# BEFORE: SERVERS
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable pdns_recursor:
#
# pdns_recursor_enable="YES"
# pdns_recursor_flags="<set as needed>"
#
# See pdns_recursor(8) for flags.
#
. /etc/rc.subr
name=pdns_recursor
rcvar=pdns_recursor_enable
load_rc_config ${name}
pdns_recursor_enable=${pdns_recursor_enable:-"NO"}
pdns_recursor_conf=${pdns_recursor_conf:-"%%PREFIX%%/etc/pdns/recursor.conf"}
required_files=${pdns_recursor_conf}
# run_rc_command would send ${name}_flags as parameters to $command (daemon)
# This ensures they are actually passed to pdns_recursor instead.
actual_pdns_recursor_flags="${pdns_recursor_flags}"
pdns_recursor_flags=""
pidfile="/var/run/${name}.pid"
actual_command="%%PREFIX%%/sbin/${name}"
command="/usr/sbin/daemon"
command_args="-c -f -r -P ${pidfile} ${actual_command} --daemon=no --write-pid=no ${actual_pdns_recursor_flags}"
run_rc_command "$1"