1
0
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:
bossm8
2025-01-03 15:22:00 +01:00
committed by GitHub
parent 5f53d3e87d
commit b83c1d5f64
4 changed files with 19 additions and 5 deletions

View File

@ -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)