coreos-home-server/config/service/rspamd/systemd/rspamd-dkim-generate@.service
Alex Palaistras 79231c37f1 Set generic Podman defaults and per-service log IDs
Defaults for Podman that were previous applied as command-line arguments
to all `podman run` or `podman create` invocations are now specified in
a dedicated configuration file.

Services are also better identified against their name rather than the
generic `podman` ID derived from the `ExecStart` invocations.
2021-08-28 22:27:54 +01:00

16 lines
575 B
Desktop File

[Unit]
Description=DKIM Key for %I
Wants=rspamd.service
After=rspamd.service
[Service]
Type=oneshot
SyslogIdentifier=%N
ExecStartPre=/bin/podman exec rspamd install -d /var/lib/rspamd/dkim
ExecStart=/bin/podman exec rspamd openssl genrsa -out /var/lib/rspamd/dkim/%i.dkim.key 1024
ExecStartPost=/bin/podman exec rspamd chmod 644 /var/lib/rspamd/dkim/%i.dkim.key
ExecStartPost=/bin/podman exec rspamd sh -c 'echo "Public DKIM key:"; openssl rsa -in /var/lib/rspamd/dkim/%i.dkim.key -pubout -outform der 2> /dev/null | openssl base64 -A'
[Install]
WantedBy=multi-user.target