mirror of
https://github.com/usmannasir/cyberpanel.git
synced 2025-11-11 07:46:10 +01:00
add custom ssl check
This commit is contained in:
@@ -37,7 +37,7 @@ class Renew:
|
|||||||
if int(diff.days) >= 15:
|
if int(diff.days) >= 15:
|
||||||
logging.writeToFile(
|
logging.writeToFile(
|
||||||
'SSL exists for %s and is not ready to renew, skipping..' % (website.domain), 0)
|
'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(
|
logging.writeToFile(
|
||||||
'SSL exists for %s and ready to renew..' % (website.domain), 0)
|
'SSL exists for %s and ready to renew..' % (website.domain), 0)
|
||||||
logging.writeToFile(
|
logging.writeToFile(
|
||||||
@@ -45,6 +45,9 @@ class Renew:
|
|||||||
|
|
||||||
virtualHostUtilities.issueSSL(website.domain, '/home/%s/public_html' % (website.domain),
|
virtualHostUtilities.issueSSL(website.domain, '/home/%s/public_html' % (website.domain),
|
||||||
website.adminEmail)
|
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:
|
else:
|
||||||
logging.writeToFile(
|
logging.writeToFile(
|
||||||
'SSL exists for %s and ready to renew..' % (website.domain), 0)
|
'SSL exists for %s and ready to renew..' % (website.domain), 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user