Skip to content

Commit 44472db

Browse files
committed
Fix letsencrypt renew
1 parent 9d9caa4 commit 44472db

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ee/cli/plugins/site.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1194,6 +1194,9 @@ def doupdatesite(self, pargs):
11941194
else:
11951195
Log.error(self,"Cannot RENEW ! SSL is not configured for given site .")
11961196

1197+
if not EEService.reload_service(self, 'nginx'):
1198+
Log.error(self, "service nginx reload failed. "
1199+
"check issues with `nginx -t` command")
11971200
Log.info(self, "SUCCESS: Certificate was successfully renewed For"
11981201
" https://{0}".format(ee_domain))
11991202
if (SSL.getExpirationDays(self,ee_domain)>0):
@@ -1202,6 +1205,7 @@ def doupdatesite(self, pargs):
12021205

12031206
else:
12041207
Log.warn(self, "Your cert already EXPIRED !. PLEASE renew soon . ")
1208+
return 0
12051209

12061210
if pargs.all and pargs.letsencrypt == "renew":
12071211

@@ -1212,6 +1216,9 @@ def doupdatesite(self, pargs):
12121216
min_expiry_days = 30
12131217
if (expiry_days <= min_expiry_days):
12141218
renewLetsEncrypt(self,ee_domain)
1219+
if not EEService.reload_service(self, 'nginx'):
1220+
Log.error(self, "service nginx reload failed. "
1221+
"check issues with `nginx -t` command")
12151222
Log.info(self, "SUCCESS: Certificate was successfully renewed For"
12161223
" https://{0}".format(ee_domain))
12171224
else:

0 commit comments

Comments
 (0)