From 2a1e0049623ab96c1a8a0780fdfb6c6b3a60dca7 Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 2 Apr 2024 19:54:42 +0200 Subject: [PATCH] DNS: ensure dig is installed --- cmdeploy/src/cmdeploy/dns.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmdeploy/src/cmdeploy/dns.py b/cmdeploy/src/cmdeploy/dns.py index f9c4f88..f13035b 100644 --- a/cmdeploy/src/cmdeploy/dns.py +++ b/cmdeploy/src/cmdeploy/dns.py @@ -11,6 +11,11 @@ class DNS: self.session = requests.Session() self.out = out self.ssh = f"ssh root@{mail_domain} -- " + try: + self.shell(f"apt update") + self.shell(f"apt install -y dnsutils") + except subprocess.CalledProcessError: + pass try: self.shell(f"unbound-control flush_zone {mail_domain}") except subprocess.CalledProcessError: