Skip to content

Commit bc9394e

Browse files
henrybarretogustavosbarreto
authored andcommitted
fix(gateway): avoid stopping renew loop when certbot command fails
1 parent 860618c commit bc9394e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gateway/certbot.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,6 @@ func (cb *CertBot) executeRenewCertificates() error {
216216
}
217217

218218
if err := cmd.Run(); err != nil {
219-
log.WithError(err).Error("failed to renew SSL certificate")
220-
221219
return err
222220
}
223221

@@ -236,7 +234,9 @@ func (cb *CertBot) renewCertificates() {
236234
for range ticker.C {
237235
log.Info("checking if SSL certificate needs to be renewed")
238236
if err := cb.executeRenewCertificates(); err != nil {
239-
log.Fatal("failed to renew SSL certificate")
237+
log.WithError(err).Error("failed to renew SSL certificate")
238+
239+
continue
240240
}
241241

242242
log.Info("ssl certificate successfully renewed")

0 commit comments

Comments
 (0)