This commit is contained in:
parent
038d08e638
commit
dc2f694ebe
@ -10,8 +10,6 @@
|
||||
|
||||
#include "utils/assert.hpp"
|
||||
|
||||
#pragma message ("TODO: Fix issues with Nuke below.")
|
||||
|
||||
namespace dropshell {
|
||||
|
||||
int nuke_handler(const CommandContext& ctx);
|
||||
@ -67,11 +65,14 @@ int nuke_one(std::string server, std::string service)
|
||||
// otherwise just uninstall.
|
||||
if (gTemplateManager().template_command_exists(service_info.template_name, "nuke"))
|
||||
{
|
||||
std::cout << "Running nuke script for " << service << " on " << server << std::endl;
|
||||
if (!server_env.run_remote_template_command(service, "nuke", {}, false, {}))
|
||||
std::cerr << "Warning: Failed to run nuke script: " << service << std::endl;
|
||||
}
|
||||
else
|
||||
{
|
||||
std::cout << "No nuke script found for " << service << " on " << server << std::endl;
|
||||
std::cout << "Running uninstall script instead and will clean directories." << std::endl;
|
||||
if (!server_env.run_remote_template_command(service, "uninstall", {}, false, {}))
|
||||
std::cerr << "Warning: Failed to uninstall service: " << service << std::endl;
|
||||
}
|
||||
|
@ -204,7 +204,7 @@ bool server_env_manager::run_remote_template_command(const std::string &service_
|
||||
|
||||
if (scommand->get_command_to_run().empty())
|
||||
return false;
|
||||
cMode mode = (command=="ssh") ? (cMode::Interactive) : cMode::Silent;
|
||||
cMode mode = (command=="ssh") ? (cMode::Interactive) : (silent ? cMode::Silent : cMode::Defaults);
|
||||
return execute_ssh_command(get_SSH_INFO(), scommand.value(), mode);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user