From a78d4e6198aad6314bba6f194ca0d192ca6fff61 Mon Sep 17 00:00:00 2001 From: missytake Date: Tue, 2 Apr 2024 20:18:22 +0200 Subject: [PATCH] DNS: optimize dnsutils installation command --- cmdeploy/src/cmdeploy/dns.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cmdeploy/src/cmdeploy/dns.py b/cmdeploy/src/cmdeploy/dns.py index f13035b..29c1723 100644 --- a/cmdeploy/src/cmdeploy/dns.py +++ b/cmdeploy/src/cmdeploy/dns.py @@ -11,11 +11,7 @@ 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 + self.out.shell_output(f"{ self.ssh }'apt-get update && apt-get install -y dnsutils'", timeout=60, no_print=True) try: self.shell(f"unbound-control flush_zone {mail_domain}") except subprocess.CalledProcessError: