summaryrefslogtreecommitdiffhomepage
path: root/libs/sgi-cgi/ipkg/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'libs/sgi-cgi/ipkg/postinst')
-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 0000000000..bbc1e53812
--- /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
+}