Fix MySQL Install

This commit is contained in:
VirtuBox
2019-09-06 12:07:34 +02:00
parent 4887452819
commit 75df2283c3
3 changed files with 20 additions and 5 deletions

View File

@@ -11,6 +11,7 @@ import string
import psutil import psutil
import requests import requests
from cement.core import handler, hook from cement.core import handler, hook
from cement.core.controller import CementBaseController, expose from cement.core.controller import CementBaseController, expose

View File

@@ -48,8 +48,9 @@ class WORepo():
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to add repo") Log.error(self, "Unable to add repo")
if ppa is not None: if ppa is not None:
WOShellExec.cmd_exec(self, "LC_ALL=C.UTF-8 add-apt-repository -yu '{ppa_name}'" WOShellExec.cmd_exec(
.format(ppa_name=ppa)) self, "LC_ALL=C.UTF-8 add-apt-repository -yu '{ppa_name}'"
.format(ppa_name=ppa))
def remove(self, ppa=None, repo_url=None): def remove(self, ppa=None, repo_url=None):
""" """
@@ -77,7 +78,18 @@ class WORepo():
Log.debug(self, "{0}".format(e)) Log.debug(self, "{0}".format(e))
Log.error(self, "Unable to remove repo") Log.error(self, "Unable to remove repo")
def add_key(self, keyids, keyserver=None): def add_key(self, keyid, keyserver=None):
"""
This function adds imports repository keys from keyserver.
default keyserver is hkp://keyserver.ubuntu.com
user can provide other keyserver with keyserver="hkp://xyz"
"""
WOShellExec.cmd_exec(self, "apt-key adv --keyserver {serv}"
.format(serv=(keyserver or
"hkp://keyserver.ubuntu.com")) +
" --recv-keys {keys}".format(key=keyid))
def add_keys(self, keyids, keyserver=None):
""" """
This function adds imports repository keys from keyserver. This function adds imports repository keys from keyserver.
default keyserver is hkp://keyserver.ubuntu.com default keyserver is hkp://keyserver.ubuntu.com

View File

@@ -109,7 +109,7 @@ class WOVariables():
.format(wo_deb_repo)) .format(wo_deb_repo))
wo_nginx = ["nginx-custom", "nginx-wo"] wo_nginx = ["nginx-custom", "nginx-wo"]
wo_nginx_key = ['188C9FB063F0247A'] wo_nginx_key = '188C9FB063F0247A'
# PHP repo and packages # PHP repo and packages
if wo_distro == 'ubuntu': if wo_distro == 'ubuntu':
@@ -118,7 +118,7 @@ class WOVariables():
wo_php_repo = ( wo_php_repo = (
"deb https://packages.sury.org/php/ {codename} main" "deb https://packages.sury.org/php/ {codename} main"
.format(codename=wo_platform_codename)) .format(codename=wo_platform_codename))
wo_php_key = ['AC0E47584A7A714D'] wo_php_key = 'AC0E47584A7A714D'
wo_php = ["php7.2-fpm", "php7.2-curl", "php7.2-gd", "php7.2-imap", wo_php = ["php7.2-fpm", "php7.2-curl", "php7.2-gd", "php7.2-imap",
"php7.2-readline", "php7.2-common", "php7.2-recode", "php7.2-readline", "php7.2-common", "php7.2-recode",
@@ -150,6 +150,8 @@ class WOVariables():
else: else:
wo_mysql_client = ["mariadb-client", "python3-mysql.connector"] wo_mysql_client = ["mariadb-client", "python3-mysql.connector"]
wo_mysql_keys = ['0xcbcb082a1bb943db', '0xF1656F24C74CD1D8']
wo_fail2ban = ["fail2ban"] wo_fail2ban = ["fail2ban"]
wo_clamav = ["clamav", "clamav-freshclam"] wo_clamav = ["clamav", "clamav-freshclam"]