mirror of
https://github.com/caddyserver/caddy.git
synced 2026-06-30 05:42:50 +00:00
SIGUSR2 triggers graceful binary upgrades (spawns new process) (#1814)
* SIGUSR2 triggers graceful binary upgrades (spawns new process) * Move some functions around, hopefully fixing Windows build * Clean up a couple file closes and add links to useful debugging thread * Use two underscores in upgrade env var To help ensure uniqueness / avoid possible collisions
This commit is contained in:
parent
d2fa8600fc
commit
5e0896305c
4 changed files with 279 additions and 44 deletions
|
|
@ -44,9 +44,14 @@ func activateHTTPS(cctx caddy.Context) error {
|
|||
// renew all relevant certificates that need renewal. this is important
|
||||
// to do right away so we guarantee that renewals aren't missed, and
|
||||
// also the user can respond to any potential errors that occur.
|
||||
err = caddytls.RenewManagedCertificates(true)
|
||||
if err != nil {
|
||||
return err
|
||||
// (skip if upgrading, because the parent process is likely already listening
|
||||
// on the ports we'd need to do ACME before we finish starting; parent process
|
||||
// already running renewal ticker, so renewal won't be missed anyway.)
|
||||
if !caddy.IsUpgrade() {
|
||||
err = caddytls.RenewManagedCertificates(true)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if !caddy.Quiet && operatorPresent {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue