Skip to content

Commit

Permalink
feat: remove command output print
Browse files Browse the repository at this point in the history
  • Loading branch information
pupilcc committed Jan 9, 2024
1 parent 95afb49 commit 7c8e1e2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions middleware/acme.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,19 @@ func Issue(name string) {
alias := os.Getenv("ACME_ALIAS")

cmd := exec.Command(filepath.Join(usr.HomeDir, ".acme.sh/acme.sh"), "--issue", "--dns", dns, "-d", name, "--challenge-alias", alias)
output, err := cmd.CombinedOutput()
_, err := cmd.CombinedOutput()
if err != nil {
logger.Error("Running command failed with %s\n", zap.String("error", err.Error()))
}
logger.Info("command", zap.String("command output:", string(output)))
}

func Install(name string, id string) {
logger := GetLogger()

cmd := exec.Command(filepath.Join(usr.HomeDir, ".acme.sh/acme.sh"), "--install-cert", "-d", name, "--key-file", filepath.Join(service.CertPath, id+".key"), "--fullchain-file", filepath.Join(service.CertPath, id+".crt"))
logger.Info("command", zap.String("Running command:", strings.Join(cmd.Args, " ")))
output, err := cmd.CombinedOutput()
_, err := cmd.CombinedOutput()
if err != nil {
logger.Error("Running command failed with %s\n", zap.String("error", err.Error()))
}
logger.Info("command", zap.String("command output:", string(output)))
}

0 comments on commit 7c8e1e2

Please sign in to comment.