DNS: add 9.9.9.9 to resolv.conf if unbound isn't there yet

This commit is contained in:
missytake
2025-03-11 11:59:26 +01:00
committed by holger krekel
parent 71160b8f65
commit 44ff6da5d2
2 changed files with 9 additions and 0 deletions

View File

@@ -27,6 +27,9 @@
- unbound: check that port 53 is not occupied by a different process
([#537](https://github.com/chatmail/server/pull/537))
- unbound: before unbound is there, use 9.9.9.9 for resolving
([#518](https://github.com/chatmail/relay/pull/518))
- Limit the bind for the HTTPS server on 8443 to 127.0.0.1
([#522](https://github.com/chatmail/server/pull/522))
([#532](https://github.com/chatmail/server/pull/532))

View File

@@ -592,6 +592,12 @@ def deploy_chatmail(config_path: Path, disable_mail: bool) -> None:
ensure_newline=True,
)
if host.get_fact(Port, port=53) != "unbound":
files.line(
name="Add 9.9.9.9 to resolv.conf",
path="/etc/resolv.conf",
line="nameserver 9.9.9.9",
)
apt.update(name="apt update", cache_time=24 * 3600)
apt.upgrade(name="upgrade apt packages", auto_remove=True)