-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
service: Add RuntimeDirectory
and LogsDirectory
to unit
#105
base: master
Are you sure you want to change the base?
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.