Sophie

Sophie

distrib > Mageia > 6 > armv7hl > media > core-updates > by-pkgid > 9070ecc7c9debbd9c8052cc6b3419f1b > scriptlet

roundcubemail-1.3.8-1.mga6.noarch.rpm

PREIN

/bin/sh
# needed if you have kolab installed
if [ -f "/etc/roundcubemail/kolab.inc.php" ]; then
    mv /etc/roundcubemail/kolab.inc.php /etc/roundcubemail/libkolab.inc.php
fi

if [ -L /usr/share/roundcubemail/plugins/enigma/home -a ! -d /usr/share/roundcubemail/plugins/enigma/home ]; then
    rm -rf /usr/share/roundcubemail/plugins/enigma/home >/dev/null 2>&1 || :
fi

POSTIN

/bin/sh
# replace default des string in config file for better security
function makedesstr () {
    chars=(0 1 2 3 4 5 6 7 8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A
    B C D E F G H I J K L M N O P Q R S T U V W X Y Z)

    max=${#chars[*]}

    for i in `seq 1 24`; do
        let rand=${RANDOM}%${max}
        str="${str}${chars[$rand]}"
    done
    echo $str
}

sed -i "s/rcmail-\!24ByteDESkey\*Str/`makedesstr`/" /etc/roundcubemail/defaults.inc.php || : &> /dev/null

sed -i -r -e "s/.*(\s*define\(\s*'RCMAIL_VERSION'\s*,\s*').*('\);)/\11.3.8-1.mga6\2/g" \
    /usr/share/roundcubemail/program/include/iniset.php || :

if [ -f "/etc/php.d/99_apcu.ini" ]; then
    if [ ! -z "`grep ^apcu.enabled=1 /etc/php.d/99_apcu.ini`" ]; then

        /sbin/systemctl condrestart %{httpd_name}

    fi
fi

/usr/share/roundcubemail/bin/updatedb.sh \
    --dir /usr/share/doc/roundcubemail/SQL/ \
    --package roundcube || : \
    >/dev/null 2>&1

exit 0

cat > README.urpmi <<EOF
WARNING: when upgrading from <= 0.9.5 the old configuration files named 
main.inc.php and db.inc.php are now deprecated and should be replaced 
with one single config.inc.php file. Run the ./bin/update.sh script to 
get this conversion done or manually merge the files. 
Also see the UPGRADE file in the doc section.
NOTE: the new config.inc.php should only contain options that differ 
from the ones listed in defaults.inc.php.
EOF