Make stack install cleaner
This commit is contained in:
@@ -863,7 +863,17 @@ def site_package_check(self, stype):
|
|||||||
if stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
|
if stype in ['mysql', 'wp', 'wpsubdir', 'wpsubdomain']:
|
||||||
Log.debug(self, "Setting apt_packages variable for MySQL")
|
Log.debug(self, "Setting apt_packages variable for MySQL")
|
||||||
if not WOShellExec.cmd_exec(self, "/usr/bin/mysqladmin ping"):
|
if not WOShellExec.cmd_exec(self, "/usr/bin/mysqladmin ping"):
|
||||||
apt_packages = apt_packages + WOVariables.wo_mysql
|
if not WOVariables.wo_distro == 'raspbian':
|
||||||
|
if (not WOVariables.wo_platform_codename == 'jessie'):
|
||||||
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
|
"python3-mysqldb", "mariadb-backup"]
|
||||||
|
else:
|
||||||
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
|
"python3-mysql.connector"]
|
||||||
|
else:
|
||||||
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
|
"python3-mysqldb"]
|
||||||
|
apt_packages = apt_packages + wo_mysql
|
||||||
|
|
||||||
if stype in ['wp', 'wpsubdir', 'wpsubdomain']:
|
if stype in ['wp', 'wpsubdir', 'wpsubdomain']:
|
||||||
Log.debug(self, "Setting packages variable for WP-CLI")
|
Log.debug(self, "Setting packages variable for WP-CLI")
|
||||||
|
|||||||
@@ -225,31 +225,20 @@ class WOStackController(CementBaseController):
|
|||||||
|
|
||||||
# MariaDB 10.3
|
# MariaDB 10.3
|
||||||
if pargs.mysql:
|
if pargs.mysql:
|
||||||
if not WOVariables.wo_distro == 'raspbian':
|
pargs.mysqltuner = True
|
||||||
if (not WOVariables.wo_platform_codename == 'jessie'):
|
Log.debug(self, "Setting apt_packages variable for MySQL")
|
||||||
if ((not WOFileUtils.grep(
|
if not WOShellExec.cmd_exec(self, "mysqladmin ping"):
|
||||||
self, "/etc/apt/sources.list.d/wo-repo.list",
|
if not WOVariables.wo_distro == 'raspbian':
|
||||||
"10.1")) and
|
if (not WOVariables.wo_platform_codename == 'jessie'):
|
||||||
(not WOFileUtils.grep(
|
|
||||||
self, "/etc/apt/sources.list.d/wo-repo.list",
|
|
||||||
"10.1"))):
|
|
||||||
|
|
||||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
"python3-mysqldb", "mariadb-backup"]
|
"python3-mysqldb", "mariadb-backup"]
|
||||||
else:
|
else:
|
||||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
"python3-mysqldb"]
|
"python3-mysql.connector"]
|
||||||
else:
|
else:
|
||||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
wo_mysql = ["mariadb-server", "percona-toolkit",
|
||||||
"python3-mysql.connector"]
|
"python3-mysqldb"]
|
||||||
else:
|
apt_packages = apt_packages + wo_mysql
|
||||||
wo_mysql = ["mariadb-server", "percona-toolkit",
|
|
||||||
"python3-mysqldb"]
|
|
||||||
|
|
||||||
pargs.mysqltuner = True
|
|
||||||
Log.debug(self, "Setting apt_packages variable for MySQL")
|
|
||||||
if not WOShellExec.cmd_exec(self, "mysqladmin ping"):
|
|
||||||
apt_packages = apt_packages + wo_mysql
|
|
||||||
else:
|
else:
|
||||||
Log.debug(self, "MySQL already installed and alive")
|
Log.debug(self, "MySQL already installed and alive")
|
||||||
Log.info(self, "MySQL already installed and alive")
|
Log.info(self, "MySQL already installed and alive")
|
||||||
|
|||||||
Reference in New Issue
Block a user