|
7 | 7 |
|
8 | 8 |
|
9 | 9 | def get_initial_remote_data(sshexec, mail_domain): |
10 | | - if sshexec == "localhost": |
11 | | - result = remote.rdns.perform_initial_checks(mail_domain) |
12 | | - elif sshexec == "docker": |
13 | | - result = remote.rdns.perform_initial_checks(mail_domain, pre_command="docker exec chatmail ") |
14 | | - else: |
15 | | - result = sshexec.logged( |
16 | | - call=remote.rdns.perform_initial_checks, kwargs=dict(mail_domain=mail_domain) |
17 | | - ) |
18 | | - return result |
| 10 | + return sshexec.logged( |
| 11 | + call=remote.rdns.perform_initial_checks, kwargs=dict(mail_domain=mail_domain) |
| 12 | + ) |
19 | 13 |
|
20 | 14 |
|
21 | 15 | def check_initial_remote_data(remote_data, *, print=print): |
@@ -50,14 +44,9 @@ def check_full_zone(sshexec, remote_data, out, zonefile) -> int: |
50 | 44 | """Check existing DNS records, optionally write them to zone file |
51 | 45 | and return (exitcode, remote_data) tuple.""" |
52 | 46 |
|
53 | | - if sshexec in ["localhost", "docker"]: |
54 | | - required_diff, recommended_diff = remote.rdns.check_zonefile( |
55 | | - zonefile=zonefile, verbose=False |
56 | | - ) |
57 | | - else: |
58 | | - required_diff, recommended_diff = sshexec.logged( |
59 | | - remote.rdns.check_zonefile, kwargs=dict(zonefile=zonefile, verbose=False), |
60 | | - ) |
| 47 | + required_diff, recommended_diff = sshexec.logged( |
| 48 | + remote.rdns.check_zonefile, kwargs=dict(zonefile=zonefile, verbose=False), |
| 49 | + ) |
61 | 50 |
|
62 | 51 | returncode = 0 |
63 | 52 | if required_diff: |
|
0 commit comments