Skip to content

Commit

Permalink
opendkim: override only some settings in the packaged systemd unit
Browse files Browse the repository at this point in the history
  • Loading branch information
missytake committed Feb 19, 2025
1 parent 75e58c3 commit dfece6e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 18 deletions.
4 changes: 2 additions & 2 deletions cmdeploy/src/cmdeploy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ def _configure_opendkim(domain: str, dkim_selector: str = "dkim") -> bool:

service_file = files.put(
name="Configure opendkim to restart once a day",
src=importlib.resources.files(__package__).joinpath("opendkim/opendkim.service"),
dest="/etc/systemd/system/opendkim.service",
src=importlib.resources.files(__package__).joinpath("opendkim/systemd.conf"),
dest="/etc/systemd/system/opendkim.service.d/10-prevent-memory-leak.conf",
)
need_restart |= service_file.changed

Expand Down
16 changes: 0 additions & 16 deletions cmdeploy/src/cmdeploy/opendkim/opendkim.service

This file was deleted.

3 changes: 3 additions & 0 deletions cmdeploy/src/cmdeploy/opendkim/systemd.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[Service]
Restart=always
RuntimeMaxSec=1d

0 comments on commit dfece6e

Please sign in to comment.