it seems the rc script needs to pass /usr/local/sbin along with the PATH variable to icinga2 as it can't locate the binary otherwise. changing export PATH=$PATH:/usr/local/bin to export PATH=$PATH:/usr/local/bin:/usr/local/sbin fixed this issue here: https://github.com/Icinga/icinga2/issues/4709
it will be fixed upstream https://github.com/Icinga/icinga2/commit/a75d7d69ec2826227f13d373f00c4cbb267e8166 so the export line is just a workaround
A commit references this bug: Author: lme Date: Tue Feb 21 11:56:37 UTC 2017 New revision: 434522 URL: https://svnweb.freebsd.org/changeset/ports/434522 Log: net-mgmt/icinga2: - Add $PREFIX/sbin to PATH in icinga2.in to fix some API issues (icingaweb2-module-director now works!) [1] - Remove SIGPIPE trap in icinga2.in which was fixed upstream - Bump PORTREVISION PR: 217266 [1] Submitted by: Philip Jocks MFH: 2017Q1 Changes: head/net-mgmt/icinga2/Makefile head/net-mgmt/icinga2/files/icinga2.in
A commit references this bug: Author: lme Date: Wed Feb 22 06:13:25 UTC 2017 New revision: 434567 URL: https://svnweb.freebsd.org/changeset/ports/434567 Log: MFH: r434522 net-mgmt/icinga2: - Add $PREFIX/sbin to PATH in icinga2.in to fix some API issues (icingaweb2-module-director now works!) [1] - Remove SIGPIPE trap in icinga2.in which was fixed upstream - Bump PORTREVISION PR: 217266 [1] Submitted by: Philip Jocks Approved by: ports-secteam (junovitch) Changes: _U branches/2017Q1/ branches/2017Q1/net-mgmt/icinga2/Makefile branches/2017Q1/net-mgmt/icinga2/files/icinga2.in
Fix committed, thanks!