Commit b0397df7 authored by Matthew Holt's avatar Matthew Holt

Save obtained certs even if there were failures

parent d93fe53e
......@@ -114,6 +114,19 @@ func Activate(configs []server.Config) ([]server.Config, error) {
errMsg += "[" + domain + "] failed to get certificate: " + obtainErr.Error() + "\n"
}
// Save the certs we did obtain, though, before leaving
if err := saveCertsAndKeys(certificates); err == nil {
if len(certificates) > 0 {
var certList []string
for _, cert := range certificates {
certList = append(certList, cert.Domain)
}
errMsg += "Saved certificates for: " + strings.Join(certList, ", ") + "\n"
}
} else {
errMsg += "Unable to save obtained certificates: " + err.Error() + "\n"
}
return configs, errors.New(errMsg)
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment