Sophie

Sophie

distrib > Mandriva > 9.1 > ppc > by-pkgid > b79108faf8bba76a45af51be8f8644aa > scriptlet

horde-nag-1.0-4mdk.noarch.rpm

POSTIN

/bin/sh
perl -pi -e 's/$/ index.php/ if (/DirectoryIndex\s.*index\.html/ && !/index\.php/);' /etc/httpd/conf/httpd.conf
grep -i 'Include.*nag.conf$' /etc/httpd/conf/httpd.conf >/dev/null 2>&1
if [ $? -eq 0 ]; then
	perl -pi -e 's/^#+// if (/Include.*nag.conf$/i);' /etc/httpd/conf/httpd.conf
else
	echo "Include /etc/httpd/conf/nag.conf" >>/etc/httpd/conf/httpd.conf
fi
/sbin/service httpd reload
sleep 1  # settling time vs. installing multiple RPMs at a time
# post-install instructions:
cat <<_EOF_
You must manually configure horde-nag !
Follow /usr/share/doc/horde-nag-1.0/INSTALL.mdk
_EOF_

POSTUN

/bin/sh
if [ $1 -eq 0 ]; then
	perl -pi -e 's/^/#/ if (/^Include.*nag.conf$/i);' /etc/httpd/conf/httpd.conf
    	/sbin/service httpd reload
    	sleep 1  # settling time vs. installing multiple RPMs at a time
fi