autocmd should split by space
See original GitHub issueAfter renewal I wanted to reload nginx (like graceful reload in apache). Running docker exec nginx nginx -s reload works.
The problem: Autocmd code calls execute code with the entire command in one string while other args are seperated to a list.
This is a python\linux underlying issue, because it makes docker expect a file inside the docker named “nginx -s reload” (not only nginx)
- The python code
subprocess.call(['docker','exec','nginx','nginx -s reload'],env=env)fails - while the following code succeeds:
subprocess.call(['docker','exec','nginx','nginx', '-s', 'reload'],env=env)(last argument converted to list)
My current work around is to use the deploy_hook: docker exec nginx nginx -s reload. My suggested fix it to split the command and concatenate: ["docker", "exec", container, command] will become ["docker", "exec", container] + command.split(' ') in here : https://github.com/adferrand/dnsrobocert/blob/master/src/dnsrobocert/core/hooks.py#L282
Anyway thanks for the project, use it a lot!
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:5 (3 by maintainers)

Top Related StackOverflow Question
Another approach would be to allow define
cmdinautocmdas a listThe third option is fine. It is better than the second because it doesn’t make breaking changes 😉