applications/luci-vnstat: add uci-defaults script
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 14 Jan 2011 17:47:55 +0000 (17:47 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 14 Jan 2011 17:47:55 +0000 (17:47 +0000)
applications/luci-vnstat/root/etc/uci-defaults/luci-vnstat [new file with mode: 0755]

diff --git a/applications/luci-vnstat/root/etc/uci-defaults/luci-vnstat b/applications/luci-vnstat/root/etc/uci-defaults/luci-vnstat
new file mode 100755 (executable)
index 0000000..fa204b3
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+uci -q batch <<-EOF >/dev/null
+       delete ucitrack.@vnstat[-1]
+       add ucitrack vnstat
+       set ucitrack.@vnstat[-1].init=vnstat
+       commit ucitrack
+EOF
+
+rm -f /tmp/luci-indexcache
+exit 0