Browse Source

Fix for Dovecot after MariaDB migration

bugfixes
gau1991 10 years ago
parent
commit
ff4a8e3970
  1. 9
      ee/cli/plugins/stack_migrate.py

9
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.aptget import EEAptGet
from ee.core.shellexec import EEShellExec from ee.core.shellexec import EEShellExec
from ee.core.apt_repo import EERepo from ee.core.apt_repo import EERepo
from ee.core.services import EEService
import configparser import configparser
import os import os
@ -83,7 +84,8 @@ class EEStackMigrateController(CementBaseController):
# If mail server is installed then install dovecot-sql and postfix-sql # If mail server is installed then install dovecot-sql and postfix-sql
if EEAptGet.is_installed(self, "dovecot-core"): 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"] apt_packages = EEVariables.ee_mysql + ["php5-mysql"]
Log.info(self, "Updating apt-cache, please wait ...") Log.info(self, "Updating apt-cache, please wait ...")
@ -93,6 +95,11 @@ class EEStackMigrateController(CementBaseController):
EEAptGet.auto_remove(self) EEAptGet.auto_remove(self)
EEAptGet.install(self, apt_packages) 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) @expose(hide=True)
def default(self): def default(self):
if ((not self.app.pargs.mariadb)): if ((not self.app.pargs.mariadb)):

Loading…
Cancel
Save