From 2e1f3109f5ce57c83c98755a8e29709b57a00890 Mon Sep 17 00:00:00 2001 From: Usman Nasir Date: Fri, 7 Feb 2020 17:13:58 +0500 Subject: [PATCH] add custom ssl check --- plogical/renew.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plogical/renew.py b/plogical/renew.py index ec1c8535f..63ecf9b84 100644 --- a/plogical/renew.py +++ b/plogical/renew.py @@ -37,7 +37,7 @@ class Renew: if int(diff.days) >= 15: logging.writeToFile( 'SSL exists for %s and is not ready to renew, skipping..' % (website.domain), 0) - elif x509.get_issuer().get_components()[1][1] == 'Denial': + elif x509.get_issuer().get_components()[1][1].decode('utf-8') == 'Denial': logging.writeToFile( 'SSL exists for %s and ready to renew..' % (website.domain), 0) logging.writeToFile( @@ -45,6 +45,9 @@ class Renew: virtualHostUtilities.issueSSL(website.domain, '/home/%s/public_html' % (website.domain), website.adminEmail) + elif x509.get_issuer().get_components()[1][1].decode('utf-8') != "Let's Encrypt": + logging.writeToFile( + 'Custom SSL exists for %s and ready to renew..' % (website.domain), 1) else: logging.writeToFile( 'SSL exists for %s and ready to renew..' % (website.domain), 0)