Use numeric prefixes for uci-defaults scripts
[project/luci.git] / applications / luci-app-statistics / root / etc / uci-defaults / 40_luci-statistics
diff --git a/applications/luci-app-statistics/root/etc/uci-defaults/40_luci-statistics b/applications/luci-app-statistics/root/etc/uci-defaults/40_luci-statistics
new file mode 100755 (executable)
index 0000000..28e3529
--- /dev/null
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# register commit handler
+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
+EOF
+
+# symlink for busybox httpd
+[ -x /usr/sbin/httpd ] && [ ! -h /www/rrdimg ] && \
+       ln -s /tmp/rrdimg /www/rrdimg
+
+rm -f /tmp/luci-indexcache
+exit 0