summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-app-statistics
diff options
context:
space:
mode:
authorFlorian Eckert <fe@dev.tdt.de>2019-07-09 13:59:24 +0200
committerGitHub <noreply@github.com>2019-07-09 13:59:24 +0200
commit9f1757a8af90369ab3d1ec4a6d7f08d0c0ae4ec5 (patch)
tree3bd6201aedd0df6a75d83350075d064008881a2a /applications/luci-app-statistics
parentda35bfcf54246550bd00b1004f5ec2ca3764457b (diff)
parent0633fb23c8863b4757f30a49853dc50493687118 (diff)
Merge pull request #2844 from TDT-AG/pr/20190709-luci-app-statistics
luci-app-statistics: fix collectd config generation
Diffstat (limited to 'applications/luci-app-statistics')
-rwxr-xr-xapplications/luci-app-statistics/root/usr/bin/stat-genconfig16
1 files changed, 11 insertions, 5 deletions
diff --git a/applications/luci-app-statistics/root/usr/bin/stat-genconfig b/applications/luci-app-statistics/root/usr/bin/stat-genconfig
index df36da419f..0c49b1f953 100755
--- a/applications/luci-app-statistics/root/usr/bin/stat-genconfig
+++ b/applications/luci-app-statistics/root/usr/bin/stat-genconfig
@@ -276,15 +276,11 @@ plugins = {
{ },
{ }
},
- curl = config_curl,
- exec = config_exec,
- iptables = config_iptables,
logfile = {
{ "LogLevel", "File" },
{ "Timestamp" },
{ }
},
- network = config_network,
}
local plugin_dir = "/usr/lib/lua/luci/statistics/plugins/"
@@ -293,7 +289,17 @@ for filename in nixio.fs.dir(plugin_dir) do
setfenv(plugin_fun, { _ = luci.i18n.translate })
local plugin = plugin_fun()
local name = filename:gsub("%.lua", "")
- plugins[name] = plugin.legend
+ if (name == "exec") then
+ plugins[name] = config_exec
+ elseif (name == "iptables") then
+ plugins[name] = config_iptables
+ elseif (name == "curl") then
+ plugins[name] = config_curl
+ elseif (name == "network") then
+ plugins[name] = config_network
+ else
+ plugins[name] = plugin.legend
+ end
end