make certdb maintain go routine a own func

This commit is contained in:
6543 2021-12-05 17:44:10 +01:00
parent de439f9bec
commit a0e0d2d335
No known key found for this signature in database
GPG key ID: C99B82E40B027BAE
2 changed files with 64 additions and 71 deletions

View file

@ -109,6 +109,9 @@ func Serve(ctx *cli.Context) error {
certificates.SetupCertificates(mainDomainSuffix, dnsProvider, acmeConfig, acmeUseRateLimits, enableHTTPServer, challengeCache, keyDatabase)
// TODO: make it graceful
go certificates.MaintainCertDB(mainDomainSuffix, dnsProvider, acmeUseRateLimits, keyDatabase)
if enableHTTPServer {
go func() {
err := httpServer.ListenAndServe("[::]:80")