This commit is contained in:
@@ -175,15 +175,6 @@ std::map<std::string, ServiceStatus> service_runner::get_all_services_status(std
|
||||
{
|
||||
std::map<std::string, ServiceStatus> status;
|
||||
|
||||
std::string command = "_allservicesstatus";
|
||||
std::string service_name = "dropshell-agent";
|
||||
|
||||
if (!gTemplateManager().template_command_exists(service_name, "shared/"+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()) {
|
||||
std::cerr << "Error: Invalid server environment" << std::endl;
|
||||
@@ -191,7 +182,7 @@ std::map<std::string, ServiceStatus> service_runner::get_all_services_status(std
|
||||
}
|
||||
|
||||
std::string output;
|
||||
if (!env.run_remote_template_command_and_capture_output(service_name, "shared/"+command, {}, output, true, {}))
|
||||
if (!execute_ssh_command(env.get_SSH_INFO(), sCommand(remotepath::agent(server_name), "_allservicesstatus.sh", {}), cMode::CaptureOutput, &output))
|
||||
return status;
|
||||
|
||||
std::stringstream ss(output);
|
||||
|
Reference in New Issue
Block a user