summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2017-01-31 17:33:19 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2017-01-31 17:33:19 -0500
commit4195b07e605811accc90832907e620dee6584094 (patch)
treeb7625b16d0d6349bca922a97a33eced8ea5fd740
parentc998f5d95faa290c5d88a53d8c1b477e9baa69a8 (diff)
Add config-mgmt-collectd to have collectd.conf include collectd.d/*.conf
-rw-r--r--config-mgmt-collectd.PKGBUILD23
1 files changed, 23 insertions, 0 deletions
diff --git a/config-mgmt-collectd.PKGBUILD b/config-mgmt-collectd.PKGBUILD
new file mode 100644
index 0000000..ca7e4e9
--- /dev/null
+++ b/config-mgmt-collectd.PKGBUILD
@@ -0,0 +1,23 @@
+. ${BUILDFILE%/*}/common.sh
+pkgver=20170131
+
+depends=(collectd)
+
+package() {
+preamble
+# #### collectd
+
+# In order for configuration sets to modularly adjust the collectd
+# configuration, we patch `/etc/collectd.conf` to include
+# `/etc/collectd.d/*.conf`.
+add-file -m755 usr/share/holo/files/10-"$pkgname"/etc/collectd.conf.holoscript <<EOF
+#!/bin/sh
+{
+ grep -vxF 'Include "/etc/collectd.d/*.conf"'
+ echo
+ echo 'Include "/etc/collectd.d/*.conf"'
+} | cat -s
+EOF
+
+postamble
+}