Sophie

Sophie

distrib > Mandriva > 2007.0 > i586 > media > contrib-release > by-pkgid > c0bd330fb1a57c577d7e2a3aa9977bbc > scriptlet

ezpublish-3.7.5-1mdv2007.0.noarch.rpm

PREUN

/bin/sh
if [ $1 = "0" ]; then
    echo "NOTE: Cleaning the ezpublish cache in the /var/www/html/ezpublish directory:"
    cd /var/www/html/ezpublish; /var/www/html/ezpublish/bin/shell/clearcache.sh --clear-all; cd -
fi

POSTIN

/bin/sh
if [ -f /var/lock/subsys/httpd ]; then
    /etc/rc.d/init.d/httpd restart 1>&2;
fi
/usr/share/rpm-helper/create-file ezpublish $1 /var/www/html/ezpublish/settings/override/i18n.ini.append.php apache apache 0644 
/usr/share/rpm-helper/create-file ezpublish $1 /var/www/html/ezpublish/settings/override/image.ini.append.php apache apache 0644 
/usr/share/rpm-helper/create-file ezpublish $1 /var/www/html/ezpublish/settings/override/setup.ini.append.php apache apache 0644 
/usr/share/rpm-helper/create-file ezpublish $1 /var/www/html/ezpublish/settings/override/site.ini.append.php apache apache 0644

POSTUN

/bin/sh
if [ $1 = "0" ]; then

EZ_DIR="/var/www/html/ezpublish/settings/override"
if [ -d ${EZ_DIR} ] && [ -f ${EZ_DIR}/site.ini.append.php ]; then
    EZ_DATE=`date +%Y%m%d%N`
    echo "NOTE: Files in ${EZ_DIR} is being renamed to:"
    cd ${EZ_DIR}
	for f in *.php; do
	    echo "${EZ_DIR}/${f} -> ${EZ_DIR}/${f}.${EZ_DATE}"
	    mv ${EZ_DIR}/${f} ${EZ_DIR}/${f}.${EZ_DATE}
	    chown root:root ${EZ_DIR}/${f}.${EZ_DATE}
	    chmod 600 ${EZ_DIR}/${f}.${EZ_DATE}
	done
    echo "This has to be done if ezpublish is to be re-installed in the future. Also you may have to"
    echo "remove the database files in /var/lib/mysql/ezpublish manually."
    fi
fi

if [ "$1" = "0" ]; then
    if [ -f /var/lock/subsys/httpd ]; then
	/etc/rc.d/init.d/httpd restart 1>&2
    fi
fi