diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index e990a0d..67c61f8 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -1483,25 +1483,14 @@ class WOSiteUpdateController(CementBaseController): Log.info(self, "Congratulations! Successfully " "Configured SSL for Site " " https://{0}".format(wo_domain)) - if acme_subdomain and iswildcard: - if (SSL.getexpirationdays(self, wo_root_domain) > 0): - Log.info( - self, "Your cert will expire within " + - str(SSL.getexpirationdays(self, wo_root_domain)) + - " days.") - else: - Log.warn( - self, "Your cert already EXPIRED ! " - ".PLEASE renew soon . ") + if (SSL.getexpirationdays(self, wo_domain) > 0): + Log.info(self, "Your cert will expire within " + + str(SSL.getexpirationdays(self, wo_domain)) + + " days.") else: - if (SSL.getexpirationdays(self, wo_domain) > 0): - Log.info(self, "Your cert will expire within " + - str(SSL.getexpirationdays(self, wo_domain)) + - " days.") - else: - Log.warn( - self, "Your cert already EXPIRED ! " - ".PLEASE renew soon . ") + Log.warn( + self, "Your cert already EXPIRED ! " + ".PLEASE renew soon . ") elif data['letsencrypt'] is False: if pargs.letsencrypt == "off": diff --git a/wo/cli/plugins/site_functions.py b/wo/cli/plugins/site_functions.py index f6db964..35c481e 100644 --- a/wo/cli/plugins/site_functions.py +++ b/wo/cli/plugins/site_functions.py @@ -610,6 +610,7 @@ def setupwordpress(self, data, vhostonly=False): WOShellExec.cmd_exec(self, "/bin/bash -c \"{0} --allow-root " .format(WOVar.wo_wpcli_path) + "db clean --yes\"") + WOFileUtils.chdir(self, '{0}'.format(wo_site_webroot)) WOFileUtils.rm(self, "{0}/htdocs".format(wo_site_webroot)) WOFileUtils.mkdir(self, "{0}/htdocs".format(wo_site_webroot)) WOFileUtils.chown(self, "{0}/htdocs".format(wo_site_webroot), diff --git a/wo/core/git.py b/wo/core/git.py index 72a86f6..a157282 100644 --- a/wo/core/git.py +++ b/wo/core/git.py @@ -2,7 +2,6 @@ import os from sh import ErrorReturnCode, git - from wo.core.logging import Log @@ -72,9 +71,10 @@ class WOGit: Log.error(self, "Unable to find a git repository at {0}" .format(path)) try: - Log.debug(self, "WOGit: git reset HEAD~ at {0}" + Log.debug(self, "WOGit: git stash --include-untracked at {0}" .format(path)) - git.reset("HEAD~", "--hard") + git.stash("push", "--include-untracked", "-m {0}" + .format(msg)) except ErrorReturnCode as e: Log.debug(self, "{0}".format(e)) Log.error(self, "Unable to git reset at {0} " diff --git a/wo/core/sslutils.py b/wo/core/sslutils.py index 2a2ea5f..1202c18 100644 --- a/wo/core/sslutils.py +++ b/wo/core/sslutils.py @@ -111,8 +111,9 @@ class SSL: wo_wildcard_domain = ("*.{0}".format(wo_domain_name)) for row in reader: if wo_wildcard_domain in row[2]: - iswildcard = True - break + if not row[2] == "": + iswildcard = True + break else: iswildcard = False certfile.close()