Fix logic

This commit is contained in:
John
2025-04-27 20:26:39 +12:00
parent 82185b89dc
commit acb462d15e
3 changed files with 4 additions and 11 deletions

View File

@ -132,18 +132,14 @@ int restore(const std::vector<std::string> &args)
}
std::cout << "Backup complete." << std::endl;
}
{ // silently uninstalling the current service
std::cout << "2) Uninstalling current service..." << std::endl;
env.run_remote_template_command(service_name, "uninstall", {}, false);
}
{ // restore service from backup
std::cout << "3) Restoring service from backup..." << std::endl;
std::cout << "2) Restoring service from backup..." << std::endl;
env.run_remote_template_command(service_name, "restore", {local_backup_file_path}, false);
}
// healthcheck the service
std::cout << "4) Healthchecking service..." << std::endl;
std::cout << "3) Healthchecking service..." << std::endl;
std::string green_tick = "\033[32m✓\033[0m";
std::string red_cross = "\033[31m✗\033[0m";
if (env.run_remote_template_command(service_name, "status", {}, false))