bbc1e53812745b1e98378909afd668bd8e51a28c
[project/luci.git] / libs / sgi-cgi / ipkg / postinst
1 #!/bin/sh
2 [ -f "${IPKG_INSTROOT}/etc/httpd.conf" ] && {
3 PATTERNS='/cgi-bin/luci/admin:root:$p$root'
4
5 for i in $PATTERNS
6 do
7 grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf
8 done
9
10 [ -n "${IPKG_INSTROOT}" ] || /etc/init.d/httpd restart
11 }