mirror of
https://github.com/go-acme/lego.git
synced 2025-07-15 11:24:17 +02:00
feat: add hook-timeout to run and renew commands (#2389)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
This commit is contained in:
@ -10,12 +10,12 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
func launchHook(hook string, meta map[string]string) error {
|
||||
func launchHook(hook string, timeout time.Duration, meta map[string]string) error {
|
||||
if hook == "" {
|
||||
return nil
|
||||
}
|
||||
|
||||
ctxCmd, cancel := context.WithTimeout(context.Background(), 120*time.Second)
|
||||
ctxCmd, cancel := context.WithTimeout(context.Background(), timeout)
|
||||
defer cancel()
|
||||
|
||||
parts := strings.Fields(hook)
|
||||
|
Reference in New Issue
Block a user