Commit f878247a authored by elcore's avatar elcore Committed by Matt Holt

Implement CertRenewEvent (#1879)

parent 118cf5f2
......@@ -345,6 +345,9 @@ func (c *ACMEClient) Renew(name string) error {
return errors.New("too many renewal attempts; last error: " + err.Error())
}
// Executes Cert renew events
caddy.EmitEvent(caddy.CertRenewEvent, name)
return saveCertResource(storage, newCertMeta)
}
......
......@@ -231,10 +231,11 @@ func RegisterPlugin(name string, plugin Plugin) {
// EventName represents the name of an event used with event hooks.
type EventName string
// Define the event names for the startup and shutdown events
// Define names for the various events
const (
StartupEvent EventName = "startup"
ShutdownEvent EventName = "shutdown"
StartupEvent EventName = "startup"
ShutdownEvent EventName = "shutdown"
CertRenewEvent EventName = "certrenew"
)
// EventHook is a type which holds information about a startup hook plugin.
......
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