diff --git a/tools/nextwks-tool/main.go b/tools/nextwks-tool/main.go index aace72a..d82dbcc 100644 --- a/tools/nextwks-tool/main.go +++ b/tools/nextwks-tool/main.go @@ -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