applications/luci-vnstat: add postinstall
authorJo-Philipp Wich <jow@openwrt.org>
Fri, 14 Jan 2011 17:56:30 +0000 (17:56 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Fri, 14 Jan 2011 17:56:30 +0000 (17:56 +0000)
applications/luci-vnstat/ipkg/postinst [new file with mode: 0755]

diff --git a/applications/luci-vnstat/ipkg/postinst b/applications/luci-vnstat/ipkg/postinst
new file mode 100755 (executable)
index 0000000..816084a
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+[ -n "${IPKG_INSTROOT}" ] || {
+       ( . /etc/uci-defaults/luci-vnstat ) && rm -f /etc/uci-defaults/luci-vnstat
+       /etc/init.d/vnstat enabled || /etc/init.d/vnstat enable
+       exit 0
+}