mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
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:
@@ -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(
|
||||
|
||||
10
cmdeploy/src/cmdeploy/service/chatmail-metadata.service.f
Normal file
10
cmdeploy/src/cmdeploy/service/chatmail-metadata.service.f
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Chatmail dict proxy for IMAP METADATA
|
||||
|
||||
[Service]
|
||||
ExecStart={execpath} /run/dovecot/metadata.socket vmail /home/vmail/mail/{mail_domain}
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
10
cmdeploy/src/cmdeploy/service/doveauth.service.f
Normal file
10
cmdeploy/src/cmdeploy/service/doveauth.service.f
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Chatmail dict authentication proxy for dovecot
|
||||
|
||||
[Service]
|
||||
ExecStart={execpath} /run/dovecot/doveauth.socket vmail /home/vmail/passdb.sqlite {config_path}
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
11
cmdeploy/src/cmdeploy/service/echobot.service.f
Normal file
11
cmdeploy/src/cmdeploy/service/echobot.service.f
Normal file
@@ -0,0 +1,11 @@
|
||||
[Unit]
|
||||
Description=Chatmail echo bot for testing it works
|
||||
|
||||
[Service]
|
||||
ExecStart={execpath} {config_path}
|
||||
Environment="PATH={remote_venv_dir}:$PATH"
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
10
cmdeploy/src/cmdeploy/service/filtermail.service.f
Normal file
10
cmdeploy/src/cmdeploy/service/filtermail.service.f
Normal file
@@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Chatmail Postfix before queue filter
|
||||
|
||||
[Service]
|
||||
ExecStart={execpath} {config_path}
|
||||
Restart=always
|
||||
RestartSec=30
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user