luci-app-statistics: set logfile as first item in collectd.conf
authorHannu Nyman <hannu.nyman@iki.fi>
Sun, 2 Jul 2017 20:22:26 +0000 (23:22 +0300)
committerHannu Nyman <hannu.nyman@iki.fi>
Sun, 2 Jul 2017 20:22:26 +0000 (23:22 +0300)
Force logfile plugin to be evaluated first so that it gets placed
first in the collectd.conf file.

Reference to https://collectd.org/wiki/index.php/Plugin:LogFile

Fixes #1219

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
applications/luci-app-statistics/root/usr/bin/stat-genconfig

index 090344c..f92ee2a 100755 (executable)
@@ -461,8 +461,10 @@ preprocess = {
 
 section("collectd")
 
+section("logfile")
+
 for plugin in pairs(plugins) do
-       if plugin ~= "collectd" then
+       if (plugin ~= "collectd") and (plugin ~= "logfile") then
                section( plugin )
        end
 end