POSTIN
/bin/sh
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache restart 1>&2 || :;
fi
fi };
POSTUN
/bin/sh
if [ "$1" = "0" ]; then
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache restart 1>&2 || :;
fi
fi };fi
Triggers
apache1-mod_watch <
3.18-1.1
/bin/sh
if grep -q '^Include conf\.d/\*\.conf' /etc/apache/apache.conf; then
/usr/sbin/apxs1 -e -A -n watch /etc/apache/modules/mod_watch.so 1>&2
sed -i -e '
/^Include.*mod_watch\.conf/d
' /etc/apache/apache.conf
else
# they're still using old apache.conf
sed -i -e '
s,^Include.*mod_watch\.conf,Include /etc/apache/conf.d/*_mod_watch.conf,
' /etc/apache/apache.conf
fi
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/apache ] && . /etc/sysconfig/apache
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/apache ]; then
/sbin/service apache restart 1>&2 || :;
fi
fi };