Bug 239291 - net-mgmt/telegraf: Add a rc.conf option for the --config-directory option
Summary: net-mgmt/telegraf: Add a rc.conf option for the --config-directory option
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Palle Girgensohn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-18 23:24 UTC by Craig Leres
Modified: 2019-09-25 20:06 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (girgen)


Attachments
patch (1.27 KB, patch)
2019-07-18 23:24 UTC, Craig Leres
no flags Details | Diff
revised patch (1.33 KB, patch)
2019-07-19 16:53 UTC, Craig Leres
leres: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Craig Leres freebsd_committer 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 2019-07-18 23:24:54 UTC
Created attachment 205878 [details]
patch
Comment 2 Craig Leres freebsd_committer 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 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