Tick! if no status.sh

This commit is contained in:
John 2025-04-27 15:02:13 +12:00
parent c67fc809b9
commit 3e14e50d83

View File

@ -271,10 +271,13 @@ HealthStatus service_runner::is_healthy()
return HealthStatus::ERROR;
}
if (!m_server_env.check_remote_dir_exists(mRemote_service_path)) {
return HealthStatus::NOTINSTALLED;
}
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;
return HealthStatus::UNKNOWN;
}
// Run status script, does not display output.
@ -289,7 +292,7 @@ std::string service_runner::healthtick()
std::string green_tick = "\033[32m✓\033[0m";
std::string red_cross = "\033[31m✗\033[0m";
std::string yellow_exclamation = "\033[33m!\033[0m";
std::string unknown = "\033[33m?\033[0m";
std::string unknown = "\033[37m✓\033[0m";
HealthStatus status = is_healthy();
if (status == HealthStatus::HEALTHY)