summaryrefslogtreecommitdiffhomepage
path: root/applications/luci-statistics/root/etc
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2011-01-14 17:48:44 +0000
committerJo-Philipp Wich <jow@openwrt.org>2011-01-14 17:48:44 +0000
commit6811edb3d9fe289190fbc7337d372027a655daf8 (patch)
treee9019876b2aff8b48a853ded274ece488247a6d5 /applications/luci-statistics/root/etc
parentba949a84f61729b1cbfecd2780b9c4d5095c2d51 (diff)
applications: revise uci-defaults scripts
Diffstat (limited to 'applications/luci-statistics/root/etc')
-rwxr-xr-x[-rw-r--r--]applications/luci-statistics/root/etc/uci-defaults/luci-statistics11
1 files changed, 6 insertions, 5 deletions
diff --git a/applications/luci-statistics/root/etc/uci-defaults/luci-statistics b/applications/luci-statistics/root/etc/uci-defaults/luci-statistics
index 9453dc1d0d..e94a8637c8 100644..100755
--- a/applications/luci-statistics/root/etc/uci-defaults/luci-statistics
+++ b/applications/luci-statistics/root/etc/uci-defaults/luci-statistics
@@ -1,9 +1,8 @@
#!/bin/sh
# register commit handler
-[ -f /etc/config/ucitrack ] && \
-[ "$(uci get ucitrack.@luci_statistics[0] 2>/dev/null)" != "luci_statistics" ] && \
-uci batch <<-EOF >/dev/null 2>/dev/null
+uci -q batch <<-EOF >/dev/null
+ delete ucitrack.@luci_statistics[-1]
add ucitrack luci_statistics
set ucitrack.@luci_statistics[-1].init=luci_statistics
commit ucitrack
@@ -11,8 +10,9 @@ EOF
# register LuCId virtual path handler
[ -f /etc/config/lucid ] && \
-[ "$(uci get lucid.statistics 2>/dev/null)" != "DirectoryPublisher" ] && \
-uci batch <<-EOF >/dev/null 2>/dev/null
+uci -q batch <<-EOF >/dev/null
+ delete lucid.statistics
+
set lucid.statistics=DirectoryPublisher
set lucid.statistics.name='RRDTool Image Cache'
set lucid.statistics.physical=/tmp/rrdimg
@@ -32,4 +32,5 @@ EOF
# restart LuCId service
[ -x /etc/init.d/lucid ] && /etc/init.d/lucid enabled && /etc/init.d/lucid restart
+rm -f /tmp/luci-indexcache
exit 0