[Bug 275205] dns/coredns: change working directory to load extra config files

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 20 Nov 2023 03:25:53 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=275205

            Bug ID: 275205
           Summary: dns/coredns: change working directory to load extra
                    config files
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: yuri@freebsd.org
          Reporter: jinking.this@gmail.com
             Flags: maintainer-feedback?(yuri@freebsd.org)
          Assignee: yuri@freebsd.org

Created attachment 246435
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=246435&action=edit
change working directory in precmd

dns/coredns: fix hosts file can not be load from Corefile

Change working directory to config directory before running service.
The cwd of coredns daemon was /, need to be changed to config directory where
Corefile stays.
eg.
    >example.com {
    >  hosts example.hosts {
    >    reload 300s
    >    fallthrough
    >  }
    >}
example.hosts file now can be placed in config
directory("/usr/local/etc/coredns", by default).

-- 
You are receiving this mail because:
You are the assignee for the bug.