Browse Source

merge

servicefixes
harshadyeola 10 years ago
parent
commit
ddc9e637db
  1. 12
      ee/cli/plugins/stack.py
  2. 4
      ee/core/variables.py

12
ee/cli/plugins/stack.py

@ -721,6 +721,9 @@ class EEStackController(CementBaseController):
except CommandExecutionError as e:
Log.error(self, "Unable to update MySQL file")
# Set MySQLTuner permission
EEFileUtils.chmod(self, "/usr/bin/mysqltuner", 0o775)
EEGit.add(self, ["/etc/mysql"], msg="Adding MySQL into Git")
EEService.reload_service(self, 'mysql')
@ -1488,6 +1491,13 @@ class EEStackController(CementBaseController):
Log.debug(self, "Setting apt_packages variable for MySQL")
if not EEShellExec.cmd_exec(self, "mysqladmin ping"):
apt_packages = apt_packages + EEVariables.ee_mysql
packages = packages + [["https://raw."
"githubusercontent.com/"
"major/MySQLTuner-perl"
"/master/mysqltuner.pl",
"/usr/bin/mysqltuner",
"MySQLTuner"]]
else:
Log.debug(self, "MySQL connection is already alive")
Log.info(self, "MySQL connection is already alive")
@ -1673,6 +1683,7 @@ class EEStackController(CementBaseController):
if self.app.pargs.mysql:
Log.debug(self, "Removing apt_packages variable of MySQL")
apt_packages = apt_packages + EEVariables.ee_mysql
packages = packages + ['/usr/bin/mysqltuner']
if self.app.pargs.postfix:
Log.debug(self, "Removing apt_packages variable of Postfix")
apt_packages = apt_packages + EEVariables.ee_postfix
@ -1786,6 +1797,7 @@ class EEStackController(CementBaseController):
if self.app.pargs.mysql:
Log.debug(self, "Purge apt_packages variable MySQL")
apt_packages = apt_packages + EEVariables.ee_mysql
packages = packages + ['/usr/bin/mysqltuner']
if self.app.pargs.postfix:
Log.debug(self, "Purge apt_packages variable PostFix")
apt_packages = apt_packages + EEVariables.ee_postfix

4
ee/core/variables.py

@ -107,7 +107,9 @@ class EEVariables():
ee_mysql_repo = ("deb http://mirror.aarnet.edu.au/pub/MariaDB/repo/"
"10.0/debian {codename} main"
.format(codename=ee_platform_codename))
ee_mysql = (["mariadb-server", "percona-toolkit"])
ee_mysql = ["mariadb-server", "percona-toolkit"]
# Postfix repo and packages
ee_postfix_repo = ""

Loading…
Cancel
Save