confd
confd copied to clipboard
Always log reload_cmd output
my confd:
[template]
src = "nginx.conf.tmpl"
dest = "tmp/nginx.conf"
owner = "app"
mode = "0400"
keys = [
"xxx",
]
reload_cmd = "nginx -g 'error_log /dev/stdout;' -p /app -c /app/tmp/nginx.conf"
But the output of nginx is never shown. Ideas? I feel like it will only log once the command is finished? My CMD directly executes confd.
Edit: I feel like I might be abusing the test command here.
Would it be possible to implement a positional -exec argument?
e.g. confd -conf / -exec "nginx -p /app" will execute nginx -p /app when successfully ran.
Why not just use confd ... && nginx ...?
That requires a shell.
I think it SHOULD be solved with a shell...
Use sh -c 'confd ... && exec nginx ...' so nginx replaces the shell.