fix: cloud check is warning not failure, --help works
This commit is contained in:
parent
43dfc6ec06
commit
03f56964b9
1 changed files with 10 additions and 2 deletions
|
|
@ -47,7 +47,9 @@ def preflight():
|
||||||
check(f"cmd:{c}", run_ok(f"which {c}"))
|
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")
|
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")):
|
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
|
return ok
|
||||||
|
|
||||||
# ─── Config ────────────────────────────────────────────────────────────
|
# ─── Config ────────────────────────────────────────────────────────────
|
||||||
|
|
@ -349,9 +351,15 @@ def remove_menu():
|
||||||
# ─── Main ──────────────────────────────────────────────────────────────
|
# ─── Main ──────────────────────────────────────────────────────────────
|
||||||
|
|
||||||
def 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}")
|
print(f"deploy.py v{VERSION}")
|
||||||
return
|
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":
|
if len(sys.argv) > 1 and sys.argv[1] == "--deploy-all":
|
||||||
deploy_all()
|
deploy_all()
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue