PREUN
/bin/sh
if [ "$1" = "0" ]; then
# apache1
if [ -d /etc/apache/conf.d ]; then
rm -f /etc/apache/conf.d/99_shaperd.2.conf
{
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 reload 1>&2 || :;
fi
fi }; fi
# apache2
if [ -d /etc/httpd/httpd.conf ]; then
rm -f /etc/httpd/httpd.conf/99_shaperd.2.conf
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/httpd ] && . /etc/sysconfig/httpd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/httpd ]; then
/sbin/service httpd reload 1>&2 || :;
fi
fi }; fi
fi
POSTIN
/bin/sh
# apache1
if [ -d /etc/apache/conf.d ]; then
ln -sf /etc/shaper/apache-shaperd.2.conf /etc/apache/conf.d/99_shaperd.2.conf
{
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
# apache2
if [ -d /etc/httpd/httpd.conf ]; then
ln -sf /etc/shaper/apache-shaperd.2.conf /etc/httpd/httpd.conf/99_shaperd.2.conf
{
skip_auto_restart() {
[ -f /etc/sysconfig/rpm ] && . /etc/sysconfig/rpm
[ -f /etc/sysconfig/httpd ] && . /etc/sysconfig/httpd
echo ${RPM_SKIP_AUTO_RESTART:-no}
};
if [ $(skip_auto_restart) = no ]; then
if [ -f /var/lock/subsys/httpd ]; then
/sbin/service httpd restart 1>&2 || :;
fi
fi };fi