mirror of
https://github.com/chatmail/relay.git
synced 2026-05-12 09:04:36 +00:00
chore: prevent installing recommended packages (e.g. installing cron leads to installing exim without it).
This commit is contained in:
@@ -6,7 +6,7 @@ import os
|
|||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
import sys
|
||||||
from io import StringIO
|
from io import BytesIO, StringIO
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from chatmaild.config import read_config
|
from chatmaild.config import read_config
|
||||||
@@ -478,6 +478,14 @@ class ChatmailDeployer(Deployer):
|
|||||||
self.mail_domain = mail_domain
|
self.mail_domain = mail_domain
|
||||||
|
|
||||||
def install(self):
|
def install(self):
|
||||||
|
files.put(
|
||||||
|
name="Disable installing recommended packages globally",
|
||||||
|
src=BytesIO(b'APT::Install-Recommends "false";\n'),
|
||||||
|
dest="/etc/apt/apt.conf.d/00InstallRecommends",
|
||||||
|
user="root",
|
||||||
|
group="root",
|
||||||
|
mode="644",
|
||||||
|
)
|
||||||
apt.update(name="apt update", cache_time=24 * 3600)
|
apt.update(name="apt update", cache_time=24 * 3600)
|
||||||
apt.upgrade(name="upgrade apt packages", auto_remove=True)
|
apt.upgrade(name="upgrade apt packages", auto_remove=True)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user