mirror of
https://git.nolog.cz/NoLog.cz/nginx-configurator.git
synced 2025-01-31 03:43:35 +01:00
format; better dehydrated options
This commit is contained in:
parent
e5e11af36d
commit
5494ceba1d
1 changed files with 10 additions and 3 deletions
13
ncc/main.py
13
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"))
|
||||
|
||||
|
|
Loading…
Reference in a new issue