Revert changes for MariaDB

This commit is contained in:
VirtuBox
2019-07-03 15:09:58 +02:00
parent e76d421ef1
commit 4b2703bf65
4 changed files with 19 additions and 7 deletions

View File

@@ -7,10 +7,8 @@ from wo.core.variables import WOVariables
from wo.core.aptget import WOAptGet
from wo.core.apt_repo import WORepo
from wo.core.services import WOService
from wo.core.fileutils import WOFileUtils
from wo.core.shellexec import WOShellExec
from wo.core.git import WOGit
from wo.core.download import WODownload
def wo_maintenance_hook(app):

View File

@@ -839,6 +839,9 @@ class WOSiteUpdateController(CementBaseController):
action='store_true')),
(['--all'],
dict(help="update all sites", action='store_true')),
(['--force'],
dict(help="force letsencrypt certificate renewal",
action='store_true')),
]
@expose(help="Update site type or cache")
@@ -1082,7 +1085,7 @@ class WOSiteUpdateController(CementBaseController):
expiry_days = SSL.getExpirationDays(self, wo_domain)
min_expiry_days = 30
if check_ssl:
if (expiry_days <= min_expiry_days):
if (expiry_days <= min_expiry_days) or pargs.force:
renewLetsEncrypt(self, wo_domain)
else:
Log.error(
@@ -1119,7 +1122,8 @@ class WOSiteUpdateController(CementBaseController):
if expiry_days < 0:
return 0
min_expiry_days = 30
if (expiry_days <= min_expiry_days):
if (expiry_days <= min_expiry_days) or pargs.force:
renewLetsEncrypt(self, ee_domain)
Log.info(self, "Certificate was successfully renewed")
if not WOService.reload_service(self, 'nginx'):
Log.error(self, "service nginx reload failed. "

View File

@@ -1193,7 +1193,7 @@ class WOStackController(CementBaseController):
WOMysql.execute(self,
"flush privileges;",
log=False)
except StatementExcecutionError as e:
except CommandExecutionError as e:
Log.info(
self, "fail to setup mysql user for netdata")
WOService.restart_service(self, 'netdata')
@@ -1312,7 +1312,8 @@ class WOStackController(CementBaseController):
Log.debug(self, "Extracting file anemometer.tar.gz to "
"location /var/lib/wo/tmp/ ")
WOExtract.extract(
self, '/var/lib/wo/tmp/anemometer.tar.gz', '/var/lib/wo/tmp/')
self, '/var/lib/wo/tmp/anemometer.tar.gz',
'/var/lib/wo/tmp/')
if not os.path.exists('{0}22222/htdocs/db/'
.format(WOVariables.wo_webroot)):
Log.debug(self, "Creating directory")

View File

@@ -58,6 +58,9 @@ class WOUpdateController(CementBaseController):
except OSError as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
except Exception as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
elif self.app.pargs.preserve:
try:
Log.info(self, "updating WordOps, please wait...")
@@ -65,6 +68,9 @@ class WOUpdateController(CementBaseController):
except OSError as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
except Exception as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
else:
try:
Log.info(self, "updating WordOps, please wait...")
@@ -72,6 +78,9 @@ class WOUpdateController(CementBaseController):
except OSError as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
except Exception as e:
Log.debug(self, str(e))
Log.error(self, "WordOps update failed !")
def load(app):