From 7f0463602d2a09cc03050ca37544ba395a5f07b1 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 30 Aug 2019 08:51:43 +0200 Subject: [PATCH] Fix wo site info --- wo/cli/plugins/site.py | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index 06c614b..129f6e4 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -137,7 +137,7 @@ class WOSiteController(CementBaseController): Log.error(self, 'could not input site name') pargs.site_name = pargs.site_name.strip() (wo_domain, wo_www_domain) = ValidateDomain(pargs.site_name) - wo_domain_type, wo_root_domain = GetDomainlevel(wo_domain) + (wo_domain_type, wo_root_domain) = GetDomainlevel(wo_domain) wo_db_name = '' wo_db_user = '' wo_db_pass = '' @@ -162,7 +162,12 @@ class WOSiteController(CementBaseController): ssl = ("enabled" if siteinfo.is_ssl else "disabled") if (ssl == "enabled"): sslprovider = "Lets Encrypt" - sslexpiry = str(SSL.getExpirationDate(self, wo_domain)) + if os.path.islink("{0}/conf/nginx/ssl.conf" + .format(wo_site_webroot)): + sslexpiry = str( + SSL.getExpirationDate(self, wo_root_domain)) + else: + sslexpiry = str(SSL.getExpirationDate(self, wo_domain)) else: sslprovider = '' sslexpiry = '' @@ -1271,14 +1276,15 @@ class WOSiteUpdateController(CementBaseController): wo_subdomain = False wo_wildcard = False - if letsencrypt is check_ssl: - if letsencrypt is False: - Log.error(self, "SSl is not configured for given " - "site") - elif letsencrypt is True: - Log.error(self, "SSl is already configured for given " - "site") - pargs.letsencrypt = False + if not wo_subdomain: + if letsencrypt is check_ssl: + if letsencrypt is False: + Log.error(self, "SSl is not configured for given " + "site") + elif letsencrypt is True: + Log.error(self, "SSl is already configured for given " + "site") + pargs.letsencrypt = False if data and (not pargs.php73): if old_php73 is True: