PREIN
/bin/sh
/usr/share/rpm-helper/add-user apache-conf $1 apache /var/www /bin/sh
# tuck away presumptive old httpd.conf file based on certain criteria
if [ -f /etc/httpd/conf/httpd.conf ]; then
if grep -q APACHEPROXIED /etc/httpd/conf/httpd.conf; then
TEMP_DATE=`date +%Y%m%d%H%M`
echo "Found an old apache v1.x /etc/httpd/conf/httpd.conf configuration file."
echo "I will rename it to /etc/httpd/conf/httpd.conf.$TEMP_DATE in order"
echo "for this install to work."
mv /etc/httpd/conf/httpd.conf /etc/httpd/conf/httpd.conf.$TEMP_DATE
fi
fi
PREUN
/bin/sh
/usr/share/rpm-helper/del-service apache-conf $1 httpd
POSTIN
/bin/sh
/usr/share/rpm-helper/add-service apache-conf $1 httpd
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2;
fi
POSTUN
/bin/sh
/usr/share/rpm-helper/del-user apache-conf $1 apache
if [ "$1" = "0" ]; then
if [ -f /var/lock/subsys/httpd ]; then
/etc/rc.d/init.d/httpd restart 1>&2
fi
fi