Systemd Service File Updates

From: Scott Kitterman <ietf-dkim_at_kitterman.com>
Date: Sat, 04 Jul 2015 12:55:26 -0400

Now that Debian and Ubuntu has shifted to Systemd as their default/only init
system, I'm going to start shipping the opendkim.service file in my package. I
did run across two issues that I think should be discussed/fixed. I've
attached the actual patch for completeness, but here are the two parts that
need separate discussion:

You can't assume that /var/run (or /run) persist from boot to boot (and in
fact has long defaulted to a tempfs on some distros). See FHS 3.15.1 [1].
+PermissionsStartOnly=true
+ExecStartPre=-/bin/mkdir _at_localstatedir@/run/opendkim
+ExecStartPre=-/bin/chown $$User.$$Group _at_localstatedir@/run/opendkim


/etc/sysconfig is not used in Debian and it's derivatives, we use /etc/default.
There's no configure option that I can find to set that directory. It would be
nice if there was a way to default the EnvironmentFile directory in configure.
 
+#EnvironmentFile=-_at_sysconfdir@/sysconfig/opendkim
+EnvironmentFile=-_at_sysconfdir@/default/opendkim

This is my first dive into systemd service files, so this may well be wrong.
Comments?

Scott K



[1] http://refspecs.linuxfoundation.org/fhs.shtml



Received on Sat Jul 04 2015 - 16:55:49 PST

This archive was generated by hypermail 2.3.0 : Sat Jul 04 2015 - 17:00:01 PST