luci-app-statistics: set logfile as first item in collectd.conf
authorHannu Nyman <hannu.nyman@iki.fi>
Sat, 2 Dec 2017 06:26:10 +0000 (08:26 +0200)
committerHannu Nyman <hannu.nyman@iki.fi>
Sat, 2 Dec 2017 06:26:10 +0000 (08:26 +0200)
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

Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
(cherry picked from commit afa7a14cafd9e6c29f7ba1e3f56fc232e5849503)

applications/luci-app-statistics/root/usr/bin/stat-genconfig

index 93f071e3f7578add8d0f302e6f20bfd365110e7a..41482ea46340fd2aeaa8c0adeb1f98d9977c1850 100755 (executable)
@@ -467,8 +467,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