Angie and nginx doesn't have --version parameter
This commit is contained in:
parent
40fa2c24cc
commit
c9c0cd2c92
1 changed files with 4 additions and 1 deletions
|
@ -57,7 +57,10 @@ def get_remote_binaries_versions(hosting: Hosting) -> dict[str, str]:
|
||||||
for binary_name, binary in binary_path_by_name.items():
|
for binary_name, binary in binary_path_by_name.items():
|
||||||
try:
|
try:
|
||||||
binary_path = binary["exec_path"]
|
binary_path = binary["exec_path"]
|
||||||
result = shell.exec(f"{binary_path} --version")
|
if "angie" in binary_name or "nginx" in binary_name:
|
||||||
|
result = shell.exec(f"{binary_path} -version")
|
||||||
|
else:
|
||||||
|
result = shell.exec(f"{binary_path} --version")
|
||||||
versions_at_host[binary_name] = {"version": _parse_version(result.stdout), "check": binary["check"]}
|
versions_at_host[binary_name] = {"version": _parse_version(result.stdout), "check": binary["check"]}
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
logger.error(f"Cannot get version for {binary_path} because of\n{exc}")
|
logger.error(f"Cannot get version for {binary_path} because of\n{exc}")
|
||||||
|
|
Loading…
Add table
Reference in a new issue