Skip to content

Commit

Permalink
allow acmettol to not be present durinig initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
hpk42 committed Jul 8, 2024
1 parent 039ef7c commit 6dedffc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions cmdeploy/src/cmdeploy/cmdeploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ def dns_cmd_options(parser):


def dns_cmd(args, out):
"""Generate dns zone file."""
exit_code = show_dns(args, out)
exit(exit_code)
"""Check DNS entries and optionally generate dns zone file."""
show_dns(args, out)


def status_cmd(args, out):
Expand Down
8 changes: 6 additions & 2 deletions cmdeploy/src/cmdeploy/remote_funcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

import re
import socket
from subprocess import check_output
from subprocess import CalledProcessError, check_output


def shell(command):
Expand All @@ -26,7 +26,11 @@ def get_systemd_running():
def perform_initial_checks(mail_domain):
res = {}

res["acme_account_url"] = shell("acmetool account-url")
try:
res["acme_account_url"] = shell("acmetool account-url")
except CalledProcessError:
res["acme_account_url"] = "notset"

shell("apt-get install -y dnsutils")
shell("unbound-control flush_zone {mail_domain}")

Expand Down

0 comments on commit 6dedffc

Please sign in to comment.