From ff4a8e39702f1f6feef9961ddae513cda46606ce Mon Sep 17 00:00:00 2001 From: gau1991 Date: Thu, 5 Mar 2015 19:16:38 +0530 Subject: [PATCH] Fix for Dovecot after MariaDB migration --- ee/cli/plugins/stack_migrate.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ee/cli/plugins/stack_migrate.py b/ee/cli/plugins/stack_migrate.py index 3f29f970..fb68dc18 100644 --- a/ee/cli/plugins/stack_migrate.py +++ b/ee/cli/plugins/stack_migrate.py @@ -6,6 +6,7 @@ from ee.core.variables import EEVariables from ee.core.aptget import EEAptGet from ee.core.shellexec import EEShellExec from ee.core.apt_repo import EERepo +from ee.core.services import EEService import configparser import os @@ -83,7 +84,8 @@ class EEStackMigrateController(CementBaseController): # If mail server is installed then install dovecot-sql and postfix-sql if EEAptGet.is_installed(self, "dovecot-core"): - apt_packages = apt_packages + ["dovecot-mysql", "postfix-mysql"] + apt_packages = apt_packages + ["dovecot-mysql", "postfix-mysql", + "libclass-dbi-mysql-perl"] apt_packages = EEVariables.ee_mysql + ["php5-mysql"] Log.info(self, "Updating apt-cache, please wait ...") @@ -93,6 +95,11 @@ class EEStackMigrateController(CementBaseController): EEAptGet.auto_remove(self) EEAptGet.install(self, apt_packages) + # Restart dovecot and postfix if installed + if EEAptGet.is_installed(self, "dovecot-core"): + EEService.restart_service(self, 'dovecot') + EEService.restart_service(self, 'postfix') + @expose(hide=True) def default(self): if ((not self.app.pargs.mariadb)):