.
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 18s

This commit is contained in:
Your Name
2025-05-10 12:44:37 +12:00
parent b5bc7b611d
commit 9e9d80570c
3 changed files with 46 additions and 22 deletions

View File

@ -289,11 +289,6 @@ std::map<std::string, ServiceStatus> service_runner::get_all_services_status(std
std::string command = "_allservicesstatus";
std::string service_name = "dropshell-agent";
if (!gTemplateManager().template_command_exists(service_name, command))
{
std::cerr << "Error: " << service_name << " does not contain the " << command << " script" << std::endl;
return status;
}
server_env_manager env(server_name);
if (!env.is_valid()) {
@ -301,8 +296,14 @@ std::map<std::string, ServiceStatus> service_runner::get_all_services_status(std
return status;
}
std::string remote_service_template_path = remotepath::service_template(server_name,service_name);
std::string script_path = remote_service_template_path + "/shared/" + command + ".sh";
sCommand scommand(remote_service_template_path, "bash " + quote(script_path), {});
std::string output;
if (!env.run_remote_template_command_and_capture_output(service_name, command, {}, output, true, {}))
cMode mode = cMode::CaptureOutput | cMode::RawCommand;
if (!execute_ssh_command(env.get_SSH_INFO(), scommand, mode, &output))
return status;
std::stringstream ss(output);