mirror of
https://github.com/chatmail/relay.git
synced 2026-05-10 16:04:37 +00:00
Configure journald to retain logs for 3 days
This commit is contained in:
@@ -292,6 +292,22 @@ def deploy_chatmail(mail_domain: str, mail_server: str, dkim_selector: str) -> N
|
|||||||
commands=[f"echo {mail_domain} >/etc/mailname; chmod 644 /etc/mailname"],
|
commands=[f"echo {mail_domain} >/etc/mailname; chmod 644 /etc/mailname"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
journald_conf = files.put(
|
||||||
|
name="Configure journald",
|
||||||
|
src=importlib.resources.files(__package__).joinpath("journald.conf"),
|
||||||
|
dest="/etc/systemd/journald.conf",
|
||||||
|
user="root",
|
||||||
|
group="root",
|
||||||
|
mode="644",
|
||||||
|
)
|
||||||
|
systemd.service(
|
||||||
|
name="Start and enable journald",
|
||||||
|
service="systemd-journald.service",
|
||||||
|
running=True,
|
||||||
|
enabled=True,
|
||||||
|
restarted=journald_conf,
|
||||||
|
)
|
||||||
|
|
||||||
def callback():
|
def callback():
|
||||||
result = server.shell(
|
result = server.shell(
|
||||||
commands=[
|
commands=[
|
||||||
|
|||||||
2
deploy-chatmail/src/deploy_chatmail/journald.conf
Normal file
2
deploy-chatmail/src/deploy_chatmail/journald.conf
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
[Journal]
|
||||||
|
MaxRetentionSec=3d
|
||||||
Reference in New Issue
Block a user