[fix] check_kind:generic_remote:command composition
This commit is contained in:
parent
9aff8752f3
commit
1b641ffc1d
|
|
@ -170,19 +170,23 @@ namespace _heimdall.check_kinds.generic_remote
|
||||||
outer_command_parts.push(lib_plankton.string.coin("{{host}}", {"host": parameters["host"]}));
|
outer_command_parts.push(lib_plankton.string.coin("{{host}}", {"host": parameters["host"]}));
|
||||||
}
|
}
|
||||||
if (parameters["ssh_port"] !== null) {
|
if (parameters["ssh_port"] !== null) {
|
||||||
outer_command_parts.push(lib_plankton.string.coin("-p {{port}}", {"port": parameters["ssh_port"].toFixed(0)}));
|
outer_command_parts.push(lib_plankton.string.coin("-p", {}));
|
||||||
|
outer_command_parts.push(lib_plankton.string.coin("{{port}}", {"port": parameters["ssh_port"].toFixed(0)}));
|
||||||
}
|
}
|
||||||
if (parameters["ssh_user"] !== null) {
|
if (parameters["ssh_user"] !== null) {
|
||||||
outer_command_parts.push(lib_plankton.string.coin("-l {{user}}", {"user": parameters["ssh_user"]}));
|
outer_command_parts.push(lib_plankton.string.coin("-l", {}));
|
||||||
|
outer_command_parts.push(lib_plankton.string.coin("{{user}}", {"user": parameters["ssh_user"]}));
|
||||||
}
|
}
|
||||||
if (parameters["ssh_key"] !== null) {
|
if (parameters["ssh_key"] !== null) {
|
||||||
outer_command_parts.push(lib_plankton.string.coin("-i {{key}}", {"key": parameters["ssh_key"]}));
|
outer_command_parts.push(lib_plankton.string.coin("-i", {}));
|
||||||
|
outer_command_parts.push(lib_plankton.string.coin("{{key}}", {"key": parameters["ssh_key"]}));
|
||||||
}
|
}
|
||||||
if (true) {
|
if (true) {
|
||||||
outer_command_parts.push(lib_plankton.string.coin("-o BatchMode=yes", {}));
|
outer_command_parts.push(lib_plankton.string.coin("-o", {}));
|
||||||
|
outer_command_parts.push(lib_plankton.string.coin("BatchMode=yes", {}));
|
||||||
}
|
}
|
||||||
if (true) {
|
if (true) {
|
||||||
outer_command_parts.push(lib_plankton.string.coin("'{{inner_command}}'", {"inner_command": inner_command}));
|
outer_command_parts.push(lib_plankton.string.coin("{{inner_command}}", {"inner_command": inner_command}));
|
||||||
}
|
}
|
||||||
const outer_command : string = outer_command_parts.join(" ");
|
const outer_command : string = outer_command_parts.join(" ");
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue