service: Add RuntimeDirectory and LogsDirectory to unit#105
service: Add RuntimeDirectory and LogsDirectory to unit#105jbergstroem wants to merge 2 commits intocaddyserver:masterfrom
RuntimeDirectory and LogsDirectory to unit#105Conversation
Caddy supports listening on a unix socket. To make it easier for users to manage said socket (including permissions), let systemd handle the creation of it.
|
So if I understand correctly, this will create https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#RuntimeDirectory= I'm realizing there's also Line 24 in 49a805b |
Yes.
Let me have a look (test) and iterate. |
|
Added the line locally and removed the log directory followed by a restart. The log directory was correctly created with |
RuntimeDirectory and LogsDirectory to unit
francislavoie
left a comment
There was a problem hiding this comment.
Thanks, LGTM!
I want to wait for @carlwgeorge's review though, he may have opinions on this.
|
Ran into this issue again the other day! Any more input, review wise? |
carlwgeorge
left a comment
There was a problem hiding this comment.
I wasn't aware that the deb package was creating a log directory. The rpm doesn't do that. Either way, the default configuration writes process logs to stderr, and doesn't write requests logs at all. It also doesn't listen on a unix socket. I don't think we should be pro-actively creating directories that aren't used by default. I think these directives make more sense as local unit file overrides.
|
We create the directory so that it's there if users want to use it for access logs. I think it's a common enough need that it's harmless to do so just to save users a step which may be surprising/confusing to require otherwise. WDYT about the |
|
It's not surprising or confusing for users who change |
Caddy supports listening on a unix socket. To make it easier for users to manage said socket (including permissions), let systemd handle the creation of it.