Bug 226484 - dns/unbound unable to stop through rc.d script when specifying alternate PID file location
Summary: dns/unbound unable to stop through rc.d script when specifying alternate PID ...
Status: Closed Not A Bug
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-09 18:16 UTC by Dries Michiels
Modified: 2018-03-09 20:34 UTC (History)
1 user (show)

See Also:
jaap: maintainer-feedback+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dries Michiels freebsd_committer freebsd_triage 2018-03-09 18:16:09 UTC
When speficying an alternate location of the PID file. The rc.d script is unable to determine PID file location after that the daemon has started.

I have the following settings in unbound.conf:
        chroot: ""
        directory: "/usr/local/etc/unbound"
        pidfile: "/var/run/unbound.pid"

When starting unbound, the program creates the PID file at the location specified. All good here.

When issuing "service unbound stop" the following output is reflected:
unbound not running? (check /usr/local/etc/unbound/unbound.pid).

While it is running. It seems like the PID file is hardcoded in the source.
Or not? Because I'd think it isn't as its a setting in unbound.conf. Altough it reflects the daemon can't handle an alternate PID file location.
Comment 1 Dries Michiels freebsd_committer freebsd_triage 2018-03-09 18:21:06 UTC
OK, nvm. Specifying the pid in rc.conf as "unbound_pidfile" fixes this issue.
Comment 2 Jaap Akkerhuis 2018-03-09 20:34:19 UTC
(In reply to Duffyx from comment #1)

You can use "unbound-checkconf -o pidfile" to pick up the value unbound is actually using. I'll add that to the rc script in the next release (if I don't forget).

        jaap