Bug 277049

Summary: dns/powerdns-recursor rc.d init script
Product: Ports & Packages Reporter: Jordan Ostreff <jordan>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Open ---    
Severity: Affects Some People CC: fernape, tremere
Priority: --- Flags: bugzilla: maintainer-feedback? (tremere)
Version: Latest   
Hardware: Any   
OS: Any   

Description Jordan Ostreff 2024-02-14 10:10:21 UTC
1. The script doesn't check for existence of recursor.yml and only wants recursor.conf
2. The script doesn't care for existence of 
recursor:
  chroot: 
in new yml syntax or the equivalent into old .conf syntax. This changes pidfile= line ...
Comment 1 Ralf van der Enden 2024-02-14 12:43:11 UTC
(In reply to Jordan Ostreff from comment #0)
Hi Jordan,

I'm open to suggestions (or patch to the rc.d script). Right now I check for recursor.conf via required_files. If I add the yaml file to that, you'd need to have both present for the script to run. Been looking for a way to check for either of the files in other rc.d scripts, but so far no luck yet.

As for the pidfile when you run it in a jail... I have no experience with that myself and peeking inside a config file seems rather complex.

Both the configfile it looks for as the pidfile location and name can be set via rc.conf variables.

I might change the recursor.conf to recursor.yml in the near future to give people time to transition.
Comment 2 Jordan Ostreff 2024-02-15 10:35:46 UTC
Hi,

I agree that using rc.conf file it is possible to change pdns_recursor_conf variable to point to recursor.yml but the important part is with 
pidfile="/var/pdns/var/run/${name}.pid"

what about to implement pdns_recursor_jaildir variable and use it like pidfile="${pdns_recursor_jaildir}/var/run/${name}.pid"?