fix: lego v5 arg order (flags after run command)
This commit is contained in:
parent
5aca6025c5
commit
fbbf1732b3
1 changed files with 2 additions and 3 deletions
|
|
@ -164,8 +164,8 @@ func obtainCertsLego(domains []string, email, backupDir, legoDir, legoPath strin
|
||||||
return fmt.Errorf("creating lego dir: %w", err)
|
return fmt.Errorf("creating lego dir: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build lego args
|
// Build lego args (v5+: flags go after the command)
|
||||||
args := []string{
|
args := []string{"run",
|
||||||
"--email", email,
|
"--email", email,
|
||||||
"--http",
|
"--http",
|
||||||
"--http.port", ":80",
|
"--http.port", ":80",
|
||||||
|
|
@ -175,7 +175,6 @@ func obtainCertsLego(domains []string, email, backupDir, legoDir, legoPath strin
|
||||||
for _, d := range domains {
|
for _, d := range domains {
|
||||||
args = append(args, "--domains", d)
|
args = append(args, "--domains", d)
|
||||||
}
|
}
|
||||||
args = append(args, "run")
|
|
||||||
|
|
||||||
cmd := exec.Command(legoPath, args...)
|
cmd := exec.Command(legoPath, args...)
|
||||||
cmd.Stdout = os.Stdout
|
cmd.Stdout = os.Stdout
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue