diff --git a/internal/common/tlsutils.go b/internal/common/tlsutils.go index 5c124ad7..f8930768 100644 --- a/internal/common/tlsutils.go +++ b/internal/common/tlsutils.go @@ -299,6 +299,8 @@ func NewCertManager(keyPairs []TLSKeyPair, configDir, logSender string) (*CertMa } randSecs := rand.Intn(59) manager.monitor() - _, err = eventScheduler.AddFunc(fmt.Sprintf("@every 8h0m%ds", randSecs), manager.monitor) + if eventScheduler != nil { + _, err = eventScheduler.AddFunc(fmt.Sprintf("@every 8h0m%ds", randSecs), manager.monitor) + } return manager, err }