• Matthew Holt's avatar
    First use of OncePerServerBlock in a Setup function · fc413e24
    Matthew Holt authored
    startup and shutdown commands should only be executed once per appearance in the Caddyfile (naturally meaning once per server block).
    
    Notice that we support multiple occurrences of startup and shutdown in the same server block by building the callback array incrementally as we parse the Caddyfile, then we append all the callbacks all at once. Quite literally, the OncePerServerBlock function executes only once per server block!
    fc413e24
startupshutdown.go 1.28 KB