init: add --force to ExecReload#84
Conversation
This caddy commit[1] adds --force flag, which helps to reload tls certificates from disk when the config does not change. This patch add this flag to ExecReload so that we can get this benefit when using systemctl reload. [1]: caddyserver/caddy@2772ede
|
Hmm, is there a way to set that flag on the systemctl command? It would be unfortunate if every reload always was forced even if not necessary or intentional... |
I don't think so. My use case is that when my acme cert is renewed, the acme service runs
I agree if the cost is not small. IMHO, |
|
Why aren't you using Caddy for ACME instead? You can reload Caddy directly by running the |
|
Well, that's a cert for my email server. Currently, I use lego and caddy together to manage that cert. It seems that if only caddy is used, it's not easy to notify my email server when the cert is renewed. |
|
I admit it's not a common use case and I am fine if you close this pr. |
|
I'm probably ok with merging it. I don't think it'll cause a problem for most users. Maybe none at all! |
mholt
left a comment
There was a problem hiding this comment.
Let's go ahead and try this. If we get (enough, or serious enough) complaints, we can revert; but I think it makes sense that if you explicitly tell the service to reload, to always reload, not just "try" to reload. If you call caddy reload directly then you can customize the flags.
|
FWIW, you can also override the systemd service if necessary: https://caddyserver.com/docs/running#overrides |
|
Yeah, and maybe that's better for this. We'll find out, based on feedback we get in the future. |
Yeah, I know that. Thanks. |
This caddy commit1 adds --force flag, which helps to reload tls
certificates from disk when the config does not change.
This patch add this flag to ExecReload so that we can get this benefit
when using systemctl reload.