Sophie

Sophie

distrib > PLD > ra > i686 > media > dist > by-pkgid > 60b718c215777b6538cee5f24732a01e > scriptlet

apache-mod_bandwidth-2.0.3-1.i686.rpm

PREUN

/bin/sh
if [ "$1" = "0" ]; then
	/usr/sbin/apxs -e -A -n bandwidth /usr/lib/apache/mod_bandwidth.so 1>&2
        grep -v "^Include.*mod_bandwidth.conf" /etc/httpd/httpd.conf > \
                /etc/httpd/httpd.conf.tmp
        mv -f /etc/httpd/httpd.conf.tmp /etc/httpd/httpd.conf
	if [ -f /var/lock/subsys/httpd ]; then
		/etc/rc.d/init.d/httpd restart 1>&2
	fi
fi

POSTIN

/bin/sh
/usr/sbin/apxs -e -a -n bandwidth /usr/lib/apache/mod_bandwidth.so 1>&2
if [ -f /etc/httpd/httpd.conf ] && ! grep -q "^Include.*mod_bandwidth.conf" /etc/httpd/httpd.conf; then
        echo "Include /etc/httpd/mod_bandwidth.conf" >> /etc/httpd/httpd.conf
fi
if [ -f /var/lock/subsys/httpd ]; then
	/etc/rc.d/init.d/httpd restart 1>&2
fi