* Removed support for Haserl
[project/luci.git] / libs / sgi-cgi / ipkg / postinst
diff --git a/libs/sgi-cgi/ipkg/postinst b/libs/sgi-cgi/ipkg/postinst
new file mode 100755 (executable)
index 0000000..bbc1e53
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/sh
+[ -f "${IPKG_INSTROOT}/etc/httpd.conf" ] && { 
+       PATTERNS='/cgi-bin/luci/admin:root:$p$root'
+
+       for i in $PATTERNS
+       do
+               grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf
+       done 
+
+       [ -n "${IPKG_INSTROOT}" ] || /etc/init.d/httpd restart
+}