Move systemd unit templates to cmdeploy

They are part of deployment rather than service itself.
Different deployments may have different users,
filesystem layout etc.
This commit is contained in:
link2xt 2024-03-28 15:21:36 +00:00 committed by holger krekel
parent c640087498
commit 3a50d82657
5 changed files with 4 additions and 2 deletions

View File

@ -110,7 +110,9 @@ def _install_remote_venv_with_chatmaild(config) -> None:
remote_venv_dir=remote_venv_dir,
mail_domain=config.mail_domain,
)
source_path = importlib.resources.files("chatmaild").joinpath(f"{fn}.service.f")
source_path = importlib.resources.files(__package__).joinpath(
"service", f"{fn}.service.f"
)
content = source_path.read_text().format(**params).encode()
files.put(

View File

@ -1,5 +1,5 @@
[Unit]
Description=Chatmail Postfix BeforeQeue filter
Description=Chatmail Postfix before queue filter
[Service]
ExecStart={execpath} {config_path}