aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2020-06-24 16:09:56 +0200
committerFlorian Eckert <fe@dev.tdt.de>2020-06-24 20:09:09 +0200
commit50f56c2ede8dc57464a94bdff4dce36ac3fe04dd (patch)
tree60aae934ad73d1c03231e2b67684e919cb3e4532
parenta1ea85a1844bd66ce71f2a434c3c5d23a04222fe (diff)
collectd: move include line
Currently the init script generates a config file from uci, that has the include line before the interval line. This means, that anything happening in the include directory does not yet see the changed Interval. Moving the include line before the uci generation process fix this issue. Signed-off-by: Florian Eckert <fe@dev.tdt.de>
-rw-r--r--utils/collectd/files/collectd.init8
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/collectd/files/collectd.init b/utils/collectd/files/collectd.init
index b07416f4e..7400194b0 100644
--- a/utils/collectd/files/collectd.init
+++ b/utils/collectd/files/collectd.init
@@ -310,10 +310,6 @@ process_config() {
config_get BaseDir globals BaseDir "/var/run/collectd"
printf "BaseDir \"%s\"\n" "$BaseDir" >> "$COLLECTD_CONF"
- config_get Include globals Include "/tmp/collectd.d"
- printf "Include \"%s\"\n" "$Include" >> "$COLLECTD_CONF"
- mkdir -p "$Include"
-
config_get PIDFile globals PIDFile "/var/run/collectd.pid"
printf "PIDFile \"%s\"\n" "$PIDFile" >> "$COLLECTD_CONF"
@@ -332,6 +328,10 @@ process_config() {
config_get Hostname globals Hostname "$(uname -n)"
printf "Hostname \"%s\"\n" "$Hostname" >> "$COLLECTD_CONF"
+ config_get Include globals Include "/tmp/collectd.d"
+ printf "Include \"%s\"\n" "$Include" >> "$COLLECTD_CONF"
+ mkdir -p "$Include"
+
printf "\n" >> "$COLLECTD_CONF"
# PLUGIN CONFIG