summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/root
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-10-29 03:59:37 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-10-29 03:59:37 +0000
commit0543ad6f4f17c719e9864e1adb4f89f0e7a3f8ab (patch)
tree6733ed6fcec0d991c9c249e4e7724b1f67fc6476 /applications/luci-statistics/root
parent9f19574ae0ae6d4881c83245d487b42251ff9528 (diff)
* luci/app/statistics:
- build datatree from rrd directory structure, allows "virtual" plugins - flush index cache on statistics reload - whitespace cleanup in config generator
Diffstat (limited to 'applications/luci-statistics/root')
-rwxr-xr-xapplications/luci-statistics/root/etc/init.d/luci_statistics3
-rwxr-xr-xapplications/luci-statistics/root/usr/bin/stat-genconfig24
2 files changed, 15 insertions, 12 deletions
diff --git a/applications/luci-statistics/root/etc/init.d/luci_statistics b/applications/luci-statistics/root/etc/init.d/luci_statistics
index 55999a8f7..e4da1d5b1 100755
--- a/applications/luci-statistics/root/etc/init.d/luci_statistics
+++ b/applications/luci-statistics/root/etc/init.d/luci_statistics
@@ -17,6 +17,9 @@ start() {
imagepath="$(uci get luci_statistics.rrdtool.image_path)"
ln -s ${imagepath:-/tmp/rrdimg}/ /www/rrdimg
fi
+
+ ### flush LuCI index cache
+ test -f /var/luci-indexcache && rm /var/luci-indexcache
}
restart() {
diff --git a/applications/luci-statistics/root/usr/bin/stat-genconfig b/applications/luci-statistics/root/usr/bin/stat-genconfig
index b62005ce1..e179cdb34 100755
--- a/applications/luci-statistics/root/usr/bin/stat-genconfig
+++ b/applications/luci-statistics/root/usr/bin/stat-genconfig
@@ -9,7 +9,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
+ http://www.apache.org/licenses/LICENSE-2.0
$Id$
@@ -96,15 +96,15 @@ function config_exec( c )
cmd = sections[s].cmdline
- if cmd then
- cmd = cmd:gsub("^%s+", ""):gsub("%s+$", "")
- user = sections[s].cmduser or "nobody"
- group = sections[s].cmdgroup
+ if cmd then
+ cmd = cmd:gsub("^%s+", ""):gsub("%s+$", "")
+ user = sections[s].cmduser or "nobody"
+ group = sections[s].cmdgroup
- str = str .. "\t" .. key .. ' "' ..
- user .. ( group and ":" .. group or "" ) .. '" "' ..
- cmd:gsub('%s+', '" "') .. '"\n'
- end
+ str = str .. "\t" .. key .. ' "' ..
+ user .. ( group and ":" .. group or "" ) .. '" "' ..
+ cmd:gsub('%s+', '" "') .. '"\n'
+ end
end
end
end
@@ -162,9 +162,9 @@ function config_network( c )
str = str .. "\t" .. key .. " " .. host .. "\n"
end
end
- end
- end
- end
+ end
+ end
+ end
return str .. _string( c["TimeToLive"], "TimeToLive" )
.. _string( c["CacheFlush"], "CacheFlush" )