Don't failed traefik start if register and subscribe failed on acme
This commit is contained in:
parent
04e3f2f401
commit
546f0173ab
1 changed files with 7 additions and 3 deletions
10
acme/acme.go
10
acme/acme.go
|
@ -335,7 +335,7 @@ func (a *ACME) CreateLocalConfig(tlsConfig *tls.Config, certs *safe.Safe, checkO
|
||||||
a.client, err = a.buildACMEClient(account)
|
a.client, err = a.buildACMEClient(account)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf(`Failed to build ACME client: %s
|
log.Errorf(`Failed to build ACME client: %s
|
||||||
Let's Encrypt functionality will be limited until traefik is restarted.`, err)
|
Let's Encrypt functionality will be limited until Traefik is restarted.`, err)
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -344,7 +344,9 @@ Let's Encrypt functionality will be limited until traefik is restarted.`, err)
|
||||||
log.Info("Register...")
|
log.Info("Register...")
|
||||||
reg, err := a.client.Register()
|
reg, err := a.client.Register()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
log.Errorf(`Failed to register user: %s
|
||||||
|
Let's Encrypt functionality will be limited until Traefik is restarted.`, err)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
account.Registration = reg
|
account.Registration = reg
|
||||||
}
|
}
|
||||||
|
@ -357,7 +359,9 @@ Let's Encrypt functionality will be limited until traefik is restarted.`, err)
|
||||||
// Let's Encrypt Subscriber Agreement renew ?
|
// Let's Encrypt Subscriber Agreement renew ?
|
||||||
reg, err := a.client.QueryRegistration()
|
reg, err := a.client.QueryRegistration()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
log.Errorf(`Failed to renew subscriber agreement: %s
|
||||||
|
Let's Encrypt functionality will be limited until Traefik is restarted.`, err)
|
||||||
|
return nil
|
||||||
}
|
}
|
||||||
account.Registration = reg
|
account.Registration = reg
|
||||||
err = a.client.AgreeToTOS()
|
err = a.client.AgreeToTOS()
|
||||||
|
|
Loading…
Reference in a new issue