diff --git a/onevent/hook/config.go b/onevent/hook/config.go index a09b2bb9e..5055e7eb4 100644 --- a/onevent/hook/config.go +++ b/onevent/hook/config.go @@ -14,8 +14,7 @@ type Config struct { // SupportedEvents is a map of supported events. var SupportedEvents = map[string]caddy.EventName{ - "startup": caddy.StartupEvent, - "instance_startup": caddy.InstanceStartupEvent, - "shutdown": caddy.ShutdownEvent, - "certrenew": caddy.CertRenewEvent, + "startup": caddy.InstanceStartupEvent, + "shutdown": caddy.ShutdownEvent, + "certrenew": caddy.CertRenewEvent, } diff --git a/onevent/on_test.go b/onevent/on_test.go index eb6f34b8d..33e4490ee 100644 --- a/onevent/on_test.go +++ b/onevent/on_test.go @@ -45,8 +45,7 @@ func TestCommandParse(t *testing.T) { }{ {name: "noInput", input: `on`, shouldErr: true}, {name: "nonExistent", input: "on xyz cmd arg", shouldErr: true}, - {name: "startup", input: `on startup cmd arg1 arg2`, shouldErr: false, config: hook.Config{Event: caddy.StartupEvent, Command: "cmd", Args: []string{"arg1", "arg2"}}}, - {name: "instance_startup", input: `on instance_startup cmd arg1 arg2`, shouldErr: false, config: hook.Config{Event: caddy.InstanceStartupEvent, Command: "cmd", Args: []string{"arg1", "arg2"}}}, + {name: "startup", input: `on startup cmd arg1 arg2`, shouldErr: false, config: hook.Config{Event: caddy.InstanceStartupEvent, Command: "cmd", Args: []string{"arg1", "arg2"}}}, {name: "shutdown", input: `on shutdown cmd arg1 arg2 &`, shouldErr: false, config: hook.Config{Event: caddy.ShutdownEvent, Command: "cmd", Args: []string{"arg1", "arg2", "&"}}}, {name: "certrenew", input: `on certrenew cmd arg1 arg2`, shouldErr: false, config: hook.Config{Event: caddy.CertRenewEvent, Command: "cmd", Args: []string{"arg1", "arg2"}}}, }