Implementing commands
Some checks failed
Dropshell Test / Build_and_Test (push) Failing after 20s

This commit is contained in:
Your Name
2025-05-11 12:22:36 +12:00
parent 3c8a66c241
commit 78dbf4aff3
11 changed files with 341 additions and 111 deletions

View File

@ -55,7 +55,7 @@ class service_runner {
std::string healthtick();
std::string healthmark();
private:
public:
// install the service over ssh, using the credentials from server.env (via server_env.hpp), by:
// 1. check if the server_name exists, and the service_name refers to a valid template
// 2. check if service_name is valid for the server_name
@ -84,9 +84,6 @@ class service_runner {
// replaces the current dropshell process with the ssh process
bool interactive_ssh_service();
// edit the service configuration file
void edit_service_config();
bool rsync_tree_to_remote(const std::string& local_path, const std::string& remote_path, bool silent=false);
bool scp_file_to_remote(const std::string& local_path, const std::string& remote_path, bool silent=false);
bool scp_file_from_remote(const std::string& remote_path, const std::string& local_path, bool silent=false);
@ -94,8 +91,6 @@ class service_runner {
// utility functions
static std::string get_latest_backup_file(const std::string& server, const std::string& service);
static bool interactive_ssh(const std::string & server_name, const std::string & command);
static void edit_server(const std::string & server_name);
static bool edit_file(const std::string & file_path);
static std::map<std::string, ServiceStatus> get_all_services_status(std::string server_name);
static std::string HealthStatus2String(HealthStatus status);