fix: lego v5 flags — use --http.address, -m for email, -d for domains

This commit is contained in:
Claus Lohmar 2026-07-07 15:14:46 +01:00
parent d144fcdc28
commit 1eb470fa12

View file

@ -166,14 +166,14 @@ func obtainCertsLego(domains []string, email, backupDir, legoDir, legoPath strin
// Build lego args (v5+: flags go after the command, use = syntax)
args := []string{"run",
"--email=" + email,
"--http",
"--http.port=:80",
"--path=" + legoDir,
"--http.address=:80",
"--path", legoDir,
"--accept-tos",
"-m", email,
}
for _, d := range domains {
args = append(args, "--domains="+d)
args = append(args, "-d", d)
}
cmd := exec.Command(legoPath, args...)