Closed mxmauro closed 2 months ago
Hello,
As you notice, this limitation is expected. You should use a script instead of an inline command.
To explain this limitation, exec.Command
requires using a slice as the argument.
The way to parse a command depends on the shell and the OS, there is no real way to smartly parse a string to use as arguments.
Duplicate of #1468
Welcome
What did you expect to see?
Hooks in certificate creation and renewal does not support quotes parameters because it uses
strings.Fields
to split fields.I expect
"nginx -t & nginx -s reload"
to be parsed as a single command-line argument.What did you see instead?
-t: line 0: syntax error: unterminated quoted string
How do you use lego?
Library
Reproduction steps
Run: `lego -d ... renew --renew-hook 'docker exec nginx sh -c "nginx -t & nginx -s reload"'
Version of lego
Logs
Go environment (if applicable)
No response