summaryrefslogtreecommitdiffhomepage
path: root/libs/sgi-cgi
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sgi-cgi')
-rwxr-xr-xlibs/sgi-cgi/ipkg/postinst11
1 files changed, 11 insertions, 0 deletions
diff --git a/libs/sgi-cgi/ipkg/postinst b/libs/sgi-cgi/ipkg/postinst
new file mode 100755
index 000000000..bbc1e5381
--- /dev/null
+++ b/libs/sgi-cgi/ipkg/postinst
@@ -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
+}