From 6811edb3d9fe289190fbc7337d372027a655daf8 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Fri, 14 Jan 2011 17:48:44 +0000 Subject: applications: revise uci-defaults scripts --- .../luci-statistics/root/etc/uci-defaults/luci-statistics | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) mode change 100644 => 100755 applications/luci-statistics/root/etc/uci-defaults/luci-statistics (limited to 'applications/luci-statistics/root/etc/uci-defaults') diff --git a/applications/luci-statistics/root/etc/uci-defaults/luci-statistics b/applications/luci-statistics/root/etc/uci-defaults/luci-statistics old mode 100644 new mode 100755 index 9453dc1d0d..e94a8637c8 --- 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 -- cgit v1.2.3