-%post mod_autoindex
-if [ "$1" = "0" ]; then
- if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_autoindex.conf" /etc/httpd/httpd.conf; then
- echo "Include /etc/httpd/mod_autoindex.conf" >> /etc/httpd/httpd.conf
- fi
- %{apxs} -e -a -n autoindex %{_libexecdir}/mod_autoindex.so 1>&2
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
-fi
-
-%preun mod_autoindex
-if [ "$1" = "0" ]; then
- umask 027
- %{apxs} -e -A -n autoindex %{_libexecdir}/mod_autoindex.so 1>&2
- grep -v "^Include.*mod_autoindex.conf" /etc/httpd/httpd.conf > \
- /etc/httpd/httpd.conf.tmp
- mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
- if [ -f /var/lock/subsys/httpd ]; then
- /etc/rc.d/init.d/httpd restart 1>&2
- fi
-fi
-