From e811e2600d16872869e09f9fb769e3c536743d45 Mon Sep 17 00:00:00 2001
From: Cameron Sparr <cameronsparr@gmail.com>
Date: Wed, 8 Mar 2017 15:26:33 +0000
Subject: [PATCH] create telegraf.d directory in tarball

closes #2513
---
 CHANGELOG.md     | 1 +
 scripts/build.py | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 01eeb8be..f6053bd6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -77,6 +77,7 @@ be deprecated eventually.
 - [#2483](https://github.com/influxdata/telegraf/pull/2483): Fix win_perf_counters capping values at 100.
 - [#2498](https://github.com/influxdata/telegraf/pull/2498): Exporting Ipmi.Path to be set by config.
 - [#2500](https://github.com/influxdata/telegraf/pull/2500): Remove warning if parse empty content
+- [#2513](https://github.com/influxdata/telegraf/issues/2513): create /etc/telegraf/telegraf.d directory in tarball.
 
 ## v1.2.1 [2017-02-01]
 
diff --git a/scripts/build.py b/scripts/build.py
index 57208bf7..aeaa04fd 100755
--- a/scripts/build.py
+++ b/scripts/build.py
@@ -22,6 +22,7 @@ INSTALL_ROOT_DIR = "/usr/bin"
 LOG_DIR = "/var/log/telegraf"
 SCRIPT_DIR = "/usr/lib/telegraf/scripts"
 CONFIG_DIR = "/etc/telegraf"
+CONFIG_DIR_D = "/etc/telegraf/telegraf.d"
 LOGROTATE_DIR = "/etc/logrotate.d"
 
 INIT_SCRIPT = "scripts/init.sh"
@@ -115,7 +116,7 @@ def create_package_fs(build_root):
     logging.debug("Creating a filesystem hierarchy from directory: {}".format(build_root))
     # Using [1:] for the path names due to them being absolute
     # (will overwrite previous paths, per 'os.path.join' documentation)
-    dirs = [ INSTALL_ROOT_DIR[1:], LOG_DIR[1:], SCRIPT_DIR[1:], CONFIG_DIR[1:], LOGROTATE_DIR[1:] ]
+    dirs = [ INSTALL_ROOT_DIR[1:], LOG_DIR[1:], SCRIPT_DIR[1:], CONFIG_DIR[1:], LOGROTATE_DIR[1:], CONFIG_DIR_D[1:] ]
     for d in dirs:
         os.makedirs(os.path.join(build_root, d))
         os.chmod(os.path.join(build_root, d), 0o755)
-- 
GitLab