PREIN
/bin/sh
# Add the "apache" user
/usr/sbin/useradd -c "Apache" -u 48 \
-s /sbin/nologin -r -d /var/www apache 2> /dev/null || :
PREUN
/bin/sh
if [ $1 = 0 ]; then
/sbin/service httpd stop > /dev/null 2>&1
/sbin/chkconfig --del httpd
fi
POSTIN
/bin/sh
# Register the httpd service
/sbin/chkconfig --add httpd
POSTTRANS
/bin/sh
test -f /etc/sysconfig/httpd-disable-posttrans || \
/sbin/service httpd condrestart >/dev/null 2>&1 || :
Triggers
apache <
2.0
/bin/sh
/sbin/chkconfig --add httpd
# Prevent removal of index.html on upgrades from 1.3
stronghold-apache <
2.0
/bin/sh
if [ -r /var/www/index.html -a ! -r /var/www/index.html.rpmold ]; then
mv /var/www/index.html /var/www/index.html.rpmold
fi
apache <
2.0
/bin/sh
/sbin/chkconfig --add httpd
# Prevent removal of index.html on upgrades from 1.3
stronghold-apache <
2.0
/bin/sh
if [ -r /var/www/index.html -a ! -r /var/www/index.html.rpmold ]; then
mv /var/www/index.html /var/www/index.html.rpmold
fi