PREUN
/bin/sh
if [ "$1" = "0" ]; then
grep -E -v "^Include.*tutos.conf" /etc/httpd/httpd.conf > \
/etc/httpd/httpd.conf.tmp
mv -f /etc/httpd/httpd.conf.tmp %{_sysconfdir}/httpd/httpd.conf
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
fi
fi
POSTIN
/bin/sh
if [ -f /etc/httpd/httpd.conf ] && \
! grep -q "^Include.*/tutos.conf" /etc/httpd/httpd.conf; then
echo "Include /etc/httpd/tutos.conf" >> /etc/httpd/httpd.conf
fi
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
else
echo "Run \"/etc/rc.d/init.d/httpd start\" to start apache http daemon."
fi