Merge pull request #1247 from jodhpurlaxman/jodhpurlaxman-patch-1

Excluded suspended websites in SSL certificate renew
This commit is contained in:
Usman Nasir
2024-04-08 21:50:26 +04:00
committed by GitHub

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()