mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-22 14:11:50 +08:00
Move certmagic import out of caddy package (#2807)
This commit is contained in:
parent
24b2e02ee5
commit
99914d2204
|
@ -83,6 +83,7 @@ func Run() {
|
|||
|
||||
caddy.AppName = appName
|
||||
caddy.AppVersion = module.Version
|
||||
caddy.OnProcessExit = append(caddy.OnProcessExit, certmagic.CleanUpOwnLocks)
|
||||
certmagic.UserAgent = appName + "/" + cleanModVersion
|
||||
|
||||
// Set up process log before anything bad happens
|
||||
|
|
|
@ -21,7 +21,6 @@ import (
|
|||
"sync"
|
||||
|
||||
"github.com/caddyserver/caddy/telemetry"
|
||||
"github.com/mholt/certmagic"
|
||||
)
|
||||
|
||||
// TrapSignals create signal handlers for all applicable signals for this
|
||||
|
@ -50,7 +49,6 @@ func trapSignalsCrossPlatform() {
|
|||
for _, f := range OnProcessExit {
|
||||
f() // important cleanup actions only
|
||||
}
|
||||
certmagic.CleanUpOwnLocks()
|
||||
os.Exit(2)
|
||||
}
|
||||
|
||||
|
@ -65,7 +63,6 @@ func trapSignalsCrossPlatform() {
|
|||
}
|
||||
|
||||
go func() {
|
||||
certmagic.CleanUpOwnLocks()
|
||||
os.Exit(executeShutdownCallbacks("SIGINT"))
|
||||
}()
|
||||
}
|
||||
|
|
|
@ -23,7 +23,6 @@ import (
|
|||
"syscall"
|
||||
|
||||
"github.com/caddyserver/caddy/telemetry"
|
||||
"github.com/mholt/certmagic"
|
||||
)
|
||||
|
||||
// trapSignalsPosix captures POSIX-only signals.
|
||||
|
@ -39,7 +38,6 @@ func trapSignalsPosix() {
|
|||
for _, f := range OnProcessExit {
|
||||
f() // only perform important cleanup actions
|
||||
}
|
||||
certmagic.CleanUpOwnLocks()
|
||||
os.Exit(0)
|
||||
|
||||
case syscall.SIGTERM:
|
||||
|
@ -57,7 +55,6 @@ func trapSignalsPosix() {
|
|||
telemetry.AppendUnique("sigtrap", "SIGTERM")
|
||||
go telemetry.StopEmitting() // won't finish in time, but that's OK - just don't block
|
||||
|
||||
certmagic.CleanUpOwnLocks()
|
||||
os.Exit(exitCode)
|
||||
|
||||
case syscall.SIGUSR1:
|
||||
|
|
Loading…
Reference in New Issue
Block a user