This commit is contained in:
Your Name
2025-04-25 10:21:41 +12:00
parent 40b992efeb
commit 5dd4a9dce6
13 changed files with 72 additions and 303 deletions

View File

@ -47,7 +47,13 @@ class service_runner {
// check health of service. Silent.
// 1. run status.sh on the server
// 2. return the output of the status.sh script
bool is_healthy();
enum class HealthStatus {
HEALTHY,
UNHEALTHY,
NOTINSTALLED,
ERROR
};
HealthStatus is_healthy();
// get the ports of the service
// 1. run _ports.sh on the server
@ -68,8 +74,8 @@ class service_runner {
// Helper methods
std::string construct_ssh_cmd() const;
bool check_remote_dir_exists(const std::string& ssh_cmd, const std::string& dir_path) const;
bool check_remote_file_exists(const std::string& ssh_cmd, const std::string& file_path) const;
bool check_remote_dir_exists(const std::string& dir_path) const;
bool check_remote_file_exists(const std::string& file_path) const;
bool execute_ssh_command(const std::string& command, const std::string& error_msg) const;
bool execute_local_command(const std::string& command, const std::string& error_msg) const;
void maketitle(const std::string& title) const;