PRETRANS
/bin/sh
# prevent symlink creation failure on update
if [ -d /etc/httpd/conf/webapps.d -a ! -L /etc/httpd/conf/webapps.d ]; then
if [ ! -d /etc/httpd/conf/sites.d ]; then
mkdir -p /etc/httpd/conf/sites.d
fi
mv -f /etc/httpd/conf/webapps.d/* /etc/httpd/conf/sites.d 2>/dev/null
rmdir /etc/httpd/conf/webapps.d
fi
if [ -d /etc/httpd/conf/vhosts.d -a ! -L /etc/httpd/conf/vhosts.d ]; then
if [ ! -d /etc/httpd/conf/sites.d ]; then
mkdir -p /etc/httpd/conf/sites.d
fi
mv -f /etc/httpd/conf/vhosts.d/* /etc/httpd/conf/sites.d 2>/dev/null
rmdir /etc/httpd/conf/vhosts.d
fi
PREUN
/bin/sh
/usr/share/rpm-helper/del-service apache $1 httpd
POSTIN
/bin/sh
/usr/bin/systemd-tmpfiles --create httpd.conf
/usr/share/rpm-helper/add-service apache $1 httpd