Sophie

Sophie

distrib > Mandriva > 2006.0 > x86_64 > media > contrib > by-pkgid > 14694505885466d608c9c6db10810ed6 > scriptlet

ezpublish-3.6.0-3mdk.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