Fix MariaDB install on Debian 10
This commit is contained in:
@@ -924,7 +924,7 @@ def site_package_check(self, stype):
|
||||
apt_packages = apt_packages + WOVariables.wo_php73
|
||||
|
||||
if (os.path.isdir("/etc/nginx/common") and
|
||||
not os.path.isfile("/etc/nginx/common/php73.conf")):
|
||||
not os.path.isfile("/etc/nginx/common/locations-wo.conf")):
|
||||
data = dict()
|
||||
Log.debug(self, 'Writting the nginx configuration to '
|
||||
'file /etc/nginx/common/locations-wo.conf')
|
||||
@@ -1299,9 +1299,18 @@ def removeAcmeConf(self, domain):
|
||||
if os.path.isdir('/etc/letsencrypt/renewal/{0}_ecc'
|
||||
.format(domain)):
|
||||
Log.debug(self, "Removing Acme configuration")
|
||||
WOFileUtils.rm(self, '/etc/letsencrypt/renewal/{0}_ecc'
|
||||
try:
|
||||
WOShellExec.cmd_exec(self, "/etc/letsencrypt/acme.sh "
|
||||
"--config-home "
|
||||
"'/etc/letsencrypt/config' "
|
||||
"--remove "
|
||||
"-d {0} --ecc"
|
||||
.format(domain))
|
||||
except CommandExecutionError as e:
|
||||
Log.error(self, "Cert removal failed")
|
||||
WOFileUtils.remove(self, '/etc/letsencrypt/renewal/{0}_ecc'
|
||||
.format(domain))
|
||||
WOFileUtils.rm(self, '/etc/letsencrypt/live/{0}'
|
||||
WOFileUtils.remove(self, '/etc/letsencrypt/live/{0}'
|
||||
.format(domain))
|
||||
WOGit.add(self, ["/etc/letsencrypt"],
|
||||
msg="Deleted {0} "
|
||||
|
||||
@@ -97,9 +97,7 @@ class WOStackController(CementBaseController):
|
||||
|
||||
if set(WOVariables.wo_mysql).issubset(set(apt_packages)):
|
||||
# add mariadb repository excepted on raspbian and ubuntu 19.04
|
||||
if ((not WOVariables.wo_platform_codename == 'disco') and
|
||||
(not WOVariables.wo_platform_distro == 'raspbian') and
|
||||
(not WOVariables.wo_platform_codename == 'buster')):
|
||||
if (not WOVariables.wo_platform_distro == 'raspbian'):
|
||||
Log.info(self, "Adding repository for MySQL, please wait...")
|
||||
mysql_pref = ("Package: *\nPin: origin "
|
||||
"sfo1.mirrors.digitalocean.com"
|
||||
@@ -214,6 +212,13 @@ class WOStackController(CementBaseController):
|
||||
else:
|
||||
Log.info(self, "Adding repository for PHP, please wait...")
|
||||
# Add repository for php
|
||||
if (WOVariables.wo_platform_codename == 'buster'):
|
||||
php_pref = ("Package: *\nPin: origin "
|
||||
"packages.sury.org"
|
||||
"\nPin-Priority: 1000\n")
|
||||
with open('/etc/apt/preferences.d/'
|
||||
'PHP.pref', 'w') as php_pref_file:
|
||||
php_pref_file.write(php_pref)
|
||||
Log.debug(self, 'Adding repo_url of php for debian')
|
||||
WORepo.add(self, repo_url=WOVariables.wo_php_repo)
|
||||
Log.debug(self, 'Adding deb.sury GPG key')
|
||||
|
||||
Reference in New Issue
Block a user