fix: cloud check is warning not failure, --help works

This commit is contained in:
admin 2026-08-03 11:24:47 +00:00
parent 43dfc6ec06
commit 03f56964b9

View file

@ -47,7 +47,9 @@ def preflight():
check(f"cmd:{c}", run_ok(f"which {c}"))
check("installer", run_ok(f"curl -fsSL -o /dev/null {AIO_URL} 2>/dev/null"), "meganode")
for cloud, host in (("US", "us1.api.wallarm.com"), ("EU", "api.wallarm.com")):
check(f"cloud:{cloud}", run_ok(f"curl -fsSL -o /dev/null https://{host} 2>/dev/null"), host)
reachable = run_ok(f"curl -fsSL --connect-timeout 5 -o /dev/null https://{host} 2>/dev/null")
m = "" if reachable else "⚠️ "
print(f" {m} cloud:{cloud}{host}{' (unreachable, will retry on deploy)' if not reachable else ''}")
return ok
# ─── Config ────────────────────────────────────────────────────────────
@ -349,9 +351,15 @@ def remove_menu():
# ─── Main ──────────────────────────────────────────────────────────────
def main():
if len(sys.argv) > 1 and sys.argv[1] == "--version":
if len(sys.argv) > 1 and sys.argv[1] in ("--version", "-v"):
print(f"deploy.py v{VERSION}")
return
if len(sys.argv) > 1 and sys.argv[1] in ("--help", "-h", "help"):
print(f"deploy.py v{VERSION} — Wallarm Node Manager")
print(" deploy.py Interactive menu")
print(" deploy.py --deploy-all Deploy all nodes from fw.conf")
print(" deploy.py --version Show version")
return
if len(sys.argv) > 1 and sys.argv[1] == "--deploy-all":
deploy_all()
return