Open mdomsch opened 2 years ago
This just stretches the race condition a little bit.
A better solution is to just drop the PIDFile
line and let systemd manage the opendkim process directly (systemd recommends this way of operating).
For example on Arch Linux it's done this way: https://github.com/archlinux/svntogit-community/blob/packages/opendkim/trunk/opendkim.service
@ghen2 fair play. We can instead use type=simple and opendkim -f so it doesn't fork. Then we don't care about the PIDFIle at all either.
Looks good!
I have submitted a similar patch to Debian, that also enables various hardening options: https://salsa.debian.org/debian/opendkim/-/merge_requests/3
I'll open a PR here too.
Red Hat BZ#2056209