Sophie

Sophie

distrib > Mandriva > 7.1 > i586 > by-pkgid > 9abe5a922196c28bfab59d6730bb3e17 > scriptlet

mod_php-4.0.6-5.1mdk.i586.rpm

POSTIN

/bin/sh
if [ $1 = "1" ]; then 
   #We're in Install mode, add module to the config files
   for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
     if [ -x /usr/sbin/advxaddmod -a -e $config ]; then
       /usr/sbin/advxaddmod $config \
	extramodules/libphp4.so mod_php4.c php4_module \
	before=perl define=HAVE_PHP4 addconf=conf/addon-modules/php.conf
     fi
   done
   if [ -x /usr/sbin/AESctl ]; then /usr/sbin/AESctl update;fi 
fi

if [ $1 -gt 1 ]; then 
   #We're in *upgrade mode*. Since we can't be sure the configuration files
   #are sane, remove module from the conf files to clean them, re-add again 
   #in a way that the older module we're replacing won't try to erase (the 
   #post scripts were broken on some packages), and finally clean the module
   #specific config file so it's compatible with the upgrade.
   for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
     if [ -x /usr/sbin/advxdelmod -a -e $config ]; then
       /usr/sbin/advxdelmod $config \
	extramodules/libphp4.so mod_php4.c php4_module \
	define=HAVE_PHP4 addconf=conf/addon-modules/php.conf
     fi
     if [ -x /usr/sbin/advxaddmod -a -e $config ]; then
       /usr/sbin/advxaddmod $config \
	extramodules/libphp4.so mod_php4.c php4_module \
	before=perl define=HAVE_PHP4 addconf=conf/addon-modules/php.conf
     fi
   done
   if [ -x /usr/sbin/advxfixconf ]; then
       /usr/sbin/advxfixconf /etc/httpd/conf/addon-modules/php.conf \
	libphp4.so mod_php4.c php4_module ifmodule
   fi
   if [ -x /usr/sbin/AESctl ]; then /usr/sbin/AESctl update;fi 
fi

POSTUN

/bin/sh
if [ $1 = "0" ]; then 
   for config in /etc/httpd/conf/{httpd,httpd-perl}.conf; do
     if [ -x /usr/sbin/advxdelmod -a -e $config ]; then
       /usr/sbin/advxdelmod $config \
	extramodules/libphp4.so mod_php4.c php4_module \
	define=HAVE_PHP4 addconf=conf/addon-modules/php.conf
     fi
   done
   if [ -x /usr/sbin/AESctl ]; then /usr/sbin/AESctl update;fi 
fi