applications/luci-vnstat: add postinstall
[project/luci.git] / applications / luci-vnstat / ipkg / postinst
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
+}