fix: lego v5 arg order (flags after run command)

This commit is contained in:
Claus Lohmar 2026-07-07 15:12:58 +01:00
parent 5aca6025c5
commit fbbf1732b3

View file

@ -164,8 +164,8 @@ func obtainCertsLego(domains []string, email, backupDir, legoDir, legoPath strin
return fmt.Errorf("creating lego dir: %w", err)
}
// Build lego args
args := []string{
// Build lego args (v5+: flags go after the command)
args := []string{"run",
"--email", email,
"--http",
"--http.port", ":80",
@ -175,7 +175,6 @@ func obtainCertsLego(domains []string, email, backupDir, legoDir, legoPath strin
for _, d := range domains {
args = append(args, "--domains", d)
}
args = append(args, "run")
cmd := exec.Command(legoPath, args...)
cmd.Stdout = os.Stdout