X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;ds=sidebyside;f=src%2Ffunctions.sh;h=76e1eff076ca02f0d5e9ee3a47c31779be3f9dd6;hb=3585ce9f66ad340ff5eceb72bb56763478967dab;hp=d52a0e2f7f151ceffa3447eac346457c852d53ad;hpb=9923899dc3d2a2472707c5bb87557817b3848a75;p=carnet-upgrade.git diff --git a/src/functions.sh b/src/functions.sh index d52a0e2..76e1eff 100644 --- a/src/functions.sh +++ b/src/functions.sh @@ -866,7 +866,7 @@ upgrade_apache2 () { pkgrm apache-common # prevents installation of apache2-suexec pkgrm php5-suhosin # not available for wheezy pkgupgrade libapache2-mod-php5 php5-cli php5-cn apache2-cn \ - php5-odbc + php5-odbc mod-security-cn } upgrade_amavis () { @@ -913,7 +913,15 @@ upgrade_postfix () { # upgrade the IMAP server upgrade_dovecot() { - if [ ! -f /etc/dovecot/conf.d/95-local ]; then + local local_conf=/etc/dovecot/conf.d/95-${backup_ext}.conf + + if [ -f /etc/dovecot/conf.d/95-local -a ! -f $local_conf ]; then + mv /etc/dovecot/conf.d/95-local $local_conf + sed -i 's/\/usr\/lib\/dovecot\/modules\/imap/\/usr\/lib\/dovecot\/modules/g' $local_conf + /etc/init.d/dovecot restart + fi + + if [ ! -f $local_conf ]; then pkgrm dovecot-cn # restore config @@ -943,7 +951,8 @@ upgrade_dovecot() { # install new version and restore local changes pkgadd dovecot-core - doveconf -n -c /etc/dovecot/dovecot.conf.$backup_ext > /etc/dovecot/conf.d/95-local + doveconf -n -c /etc/dovecot/dovecot.conf.$backup_ext > $local_conf + sed -i 's/\/user\/lib\/dovecot\/modules\/imap/\/usr\/lib\/dovecot\/modules/g' $local_conf pkgadd dovecot-cn fi