This commit is contained in:
John
2025-04-27 13:51:36 +12:00
parent c35fabe6e7
commit 13b1327da7
12 changed files with 11 additions and 63 deletions

View File

@ -274,14 +274,7 @@ HealthStatus service_runner::is_healthy()
return HealthStatus::ERROR;
}
// Check if status script exists
std::string command = "status";
if (!template_command_exists(m_service_info.template_name, command)) {
return HealthStatus::UNKNOWN;
}
std::string script_path = mRemote_service_template_path + "/" + command + ".sh";
std::string script_path = get_remote_service_template_path(m_server_name, m_service_info.service_name) + "/status.sh";
if (!m_server_env.check_remote_file_exists(script_path)) {
std::cerr << "Service is not installed: " << m_service_info.service_name << std::endl;
return HealthStatus::NOTINSTALLED;
@ -319,7 +312,7 @@ std::string service_runner::HealthStatus2String(HealthStatus status)
else if (status == HealthStatus::UNHEALTHY)
return ":cross:";
else if (status == HealthStatus::UNKNOWN)
return ":question:";
return ":greytick:";
else if (status == HealthStatus::NOTINSTALLED)
return ":warning:";
else