Skip to content

Add OpenRC service script (contrib)#405

Merged
thegushi merged 8 commits into
trusteddomainproject:developfrom
orlitzky:openrc-service
Jun 6, 2026
Merged

Add OpenRC service script (contrib)#405
thegushi merged 8 commits into
trusteddomainproject:developfrom
orlitzky:openrc-service

Conversation

@orlitzky

@orlitzky orlitzky commented Jun 4, 2026

Copy link
Copy Markdown

Continuing #41

  • Add a tmpfiles entry under contrib/systemd that supports a local socket at the path and under the user now substituted into the sample configs
  • Add the OpenRC service script that we've been using in Gentoo for about a decade
  • Teach autotools to substitute @SBINDIR@ and @SYSCONFDIR@ into that service script and tmpfiles entry
  • Add a README in contrib/openrc to explain what the directory is for
  • gitignore the built files

orlitzky added 8 commits June 4, 2026 18:27
Both OpenRC and systemd can make use of tmpfiles.d entries,

  https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html

Our sample configuration files effectively recommend putting a local
socket inside @RUNSTATEDIR@/opendkim, so here we add a tmpfiles.d
entry to create that directory and set the appropriate permissions,
assuming that the user running opendkim will be opendkim:opendkim.
Add contrib/systemd/opendkim.tmpfiles and its ".in" counterpart to the
appropriate lists in Makefile.am so that the former is built from the
latter.
These two variables, corresponding to ./configure --sbindir and
--sysconfdir, can be used by our service scripts. Let's begin
substituting them in preparation for making the service scripts
more robust.
Add a service script for the OpenRC init system used by many linux
distributions:

 * https://github.com/openrc/openrc
 * https://en.wikipedia.org/wiki/OpenRC

The service script is a template, in that the appropriate values of
--sbindir, --runstatedir, and so on will be substituted into it at
build-time. The hope is that this makes one script suitable for all
OpenRC distributions.
Add contrib/openrc/opendkim.openrc and its ".in" counterpart to the
appropriate lists in Makefile.am so that the former is built from the
latter.
Include the OpenRC "README" in dist_doc_DATA, and tell
autoconf/automake about the directory that contains it.
These are built from templates, we aren't interested in them.
@thegushi thegushi merged commit dfdd161 into trusteddomainproject:develop Jun 6, 2026
1 check passed
thegushi added a commit to thegushi/OpenDKIM that referenced this pull request Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants