Fixin'
This commit is contained in:
@ -234,6 +234,12 @@ bool service_runner::run_command(const std::string& command, std::vector<std::st
|
||||
if (command == "fullnuke")
|
||||
return fullnuke();
|
||||
|
||||
if (command == "nuke")
|
||||
{
|
||||
std::cout << "Nuking " << mService << " (" << mServiceInfo.template_name << ") on " << mServer << std::endl;
|
||||
return nuke();
|
||||
}
|
||||
|
||||
if (!gTemplateManager().template_command_exists(mServiceInfo.template_name, command)) {
|
||||
std::cout << "No command script for " << mServiceInfo.template_name << " : " << command << std::endl;
|
||||
return true; // nothing to run.
|
||||
@ -247,25 +253,25 @@ bool service_runner::run_command(const std::string& command, std::vector<std::st
|
||||
|
||||
// Check if service directory exists
|
||||
if (!mServerEnv.check_remote_dir_exists(remotepath::service(mServer, mService))) {
|
||||
std::cerr << "Error: Service is not installed: " << mService << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if command script exists
|
||||
if (!mServerEnv.check_remote_file_exists(script_path)) {
|
||||
std::cerr << "Error: Remote command script not found: " << script_path << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if env file exists
|
||||
if (!mServerEnv.check_remote_file_exists(remotefile::service_env(mServer, mService))) {
|
||||
std::cerr << "Error: Service config file not found: " << remotefile::service_env(mServer, mService) << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (command == "uninstall")
|
||||
return uninstall();
|
||||
|
||||
if (command == "nuke")
|
||||
return nuke();
|
||||
|
||||
if (command == "ssh") {
|
||||
interactive_ssh_service();
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user