diff --git a/ncc/main.py b/ncc/main.py index 2ab4524..a6c1cae 100644 --- a/ncc/main.py +++ b/ncc/main.py @@ -94,7 +94,7 @@ def cli(): "--certs-only", type=bool, is_flag=True, - help="Only fetches and deploys new certificates", + help="Try to fetch certificates and deploy", ) @click.option("--skip-master-check", type=bool, is_flag=True) def up(certs_only: bool, skip_master_check: bool): @@ -124,7 +124,12 @@ def up(certs_only: bool, skip_master_check: bool): ) ec, stdout = sysaction.run_shell( - (str(dehydrated_dir / "dehydrated.sh"), "-c"), window_height=5 + ( + str(dehydrated_dir / "dehydrated.sh"), + "-c", + *(["-g"] if certs_only else []), + ), + window_height=5, ) if ec != 0: log = Path(tempfile.mktemp()) @@ -166,7 +171,9 @@ def up(certs_only: bool, skip_master_check: bool): if (first_part := target.split("/")[0]) and ( remote := first_part.split(":")[0] ): - ec, stdout = sysaction.run_shell(("ssh", "-T", remote, "nginx -s reload")) + ec, stdout = sysaction.run_shell( + ("ssh", "-T", remote, "nginx -s reload") + ) else: ec, stdout = sysaction.run_shell(("nginx", "-s", "reload"))