Excluded suspended websites in SSL certificate renew

This commit is contained in:
Laxman Singh
2024-04-05 17:54:53 +05:30
committed by GitHub
parent c8d2a3099a
commit edef52b4f7

View File

@@ -19,9 +19,9 @@ class Renew:
try:
logging.writeToFile('Running SSL Renew Utility')
## For websites
## For Non-suspended websites only
for website in Websites.objects.all():
for website in Websites.objects.filter(status=1):
logging.writeToFile('Checking SSL for %s.' % (website.domain), 0)
filePath = '/etc/letsencrypt/live/%s/fullchain.pem' % (website.domain)
@@ -150,4 +150,4 @@ class Renew:
if __name__ == "__main__":
sslOB = Renew()
sslOB.SSLObtainer()
sslOB.SSLObtainer()