Tick! if no status.sh
This commit is contained in:
parent
c67fc809b9
commit
3e14e50d83
@ -271,10 +271,13 @@ HealthStatus service_runner::is_healthy()
|
|||||||
return HealthStatus::ERROR;
|
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";
|
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)) {
|
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::UNKNOWN;
|
||||||
return HealthStatus::NOTINSTALLED;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Run status script, does not display output.
|
// 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 green_tick = "\033[32m✓\033[0m";
|
||||||
std::string red_cross = "\033[31m✗\033[0m";
|
std::string red_cross = "\033[31m✗\033[0m";
|
||||||
std::string yellow_exclamation = "\033[33m!\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();
|
HealthStatus status = is_healthy();
|
||||||
if (status == HealthStatus::HEALTHY)
|
if (status == HealthStatus::HEALTHY)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user