Bug 239291

Summary: net-mgmt/telegraf: Add a rc.conf option for the --config-directory option
Product: Ports & Packages Reporter: Craig Leres <leres>
Component: Individual Port(s)Assignee: Palle Girgensohn <girgen>
Status: Closed FIXED    
Severity: Affects Only Me Flags: bugzilla: maintainer-feedback? (girgen)
Priority: ---    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
revised patch leres: maintainer-approval?

Description Craig Leres freebsd_committer freebsd_triage 2019-07-18 23:24:27 UTC
It's possible to run telegraf with  both a config file and config directory. 
The patch adds telegraf_confdir to allow optional use of a configuration directory.
Comment 1 Craig Leres freebsd_committer freebsd_triage 2019-07-18 23:24:54 UTC
Created attachment 205878 [details]
patch
Comment 2 Craig Leres freebsd_committer freebsd_triage 2019-07-19 16:53:57 UTC
Created attachment 205900 [details]
revised patch

I got some feedback from matthew@ and the new version explicitly defaults telegraph_confdir to any empty string.

Also my original comment did not document that my patch also changes the flags to use "--" instead of "-". Both seem to work but the usage message shows "--" so it seems better to use that.
Comment 3 commit-hook freebsd_committer freebsd_triage 2019-09-25 20:04:09 UTC
A commit references this bug:

Author: leres
Date: Wed Sep 25 20:03:49 UTC 2019
New revision: 512808
URL: https://svnweb.freebsd.org/changeset/ports/512808

Log:
  net-mgmt/telegraf: Add a rc.conf option for the --config-directory option

  While we're here:

   - Sort ONLY_FOR_ARCHS as per portlint
   - Match "telegraf -h" usage message (-quiet, -config -> --quiet, --config)

  PR:		239291
  Approved by:	girgen (maintainer timeout, 9 weeks), matthew (mentor, implicit)

Changes:
  head/net-mgmt/telegraf/Makefile
  head/net-mgmt/telegraf/files/telegraf.in