From 8e9af7c3123a1dcd7cad48e68281394529adc5d8 Mon Sep 17 00:00:00 2001 From: VirtuBox Date: Fri, 30 Aug 2019 08:35:06 +0200 Subject: [PATCH] Fix SSL check on wildcard --- wo/cli/plugins/site.py | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/wo/cli/plugins/site.py b/wo/cli/plugins/site.py index 5a91221..3226d56 100644 --- a/wo/cli/plugins/site.py +++ b/wo/cli/plugins/site.py @@ -1420,15 +1420,24 @@ class WOSiteUpdateController(CementBaseController): Log.info(self, "Congratulations! Successfully " "Configured SSl for Site " " https://{0}".format(wo_domain)) - - if (SSL.getExpirationDays(self, wo_domain) > 0): - Log.info(self, "Your cert will expire within " + - str(SSL.getExpirationDays(self, wo_domain)) + - " days.") + if wo_subdomain: + if (SSL.getExpirationDays(self, wo_root_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 . ") 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: + Log.warn( + self, "Your cert already EXPIRED ! " + ".PLEASE renew soon . ") elif data['letsencrypt'] is False: if pargs.letsencrypt == "off":