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)):