Remote create not working yet.
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name 2025-05-15 00:01:26 +12:00
parent a68e31eb6b
commit 49b1475ffd
3 changed files with 13 additions and 3 deletions

View File

@ -84,7 +84,11 @@ namespace dropshell {
// create the sh file on the remote server.
for (const auto &file : agent_files) {
// write out the file contents in the file.
remote_write_file(server_env.get_SSH_INFO(), file);
if (remote_write_file(server_env.get_SSH_INFO(), file) != 0) {
std::cerr << "Failed to write file " << file.filename << std::endl;
return 1;
}
std::cout << "Wrote file " << file.filename << " on " << server_name << std::endl;
}
return 0;

View File

@ -5,7 +5,7 @@
#include "templates.hpp"
#include "shared_commands.hpp"
#include "utils/hash.hpp"
#include "utils/createagent.hpp"
#include <unistd.h>
#include <cstring>
#include <iostream>
@ -329,6 +329,8 @@ namespace dropshell
else
std::cout << "Downloaded bb64 to " << agent_path << " on remote server." << std::endl;
// now create the agent.
create_agent(server);
return 0; // NOTIMPL
}

View File

@ -48,7 +48,11 @@ namespace dropshell {
// create the sh file on the remote server.
for (const auto &file : agent_files) {
// write out the file contents in the file.
remote_write_file(server_env.get_SSH_INFO(), file);
if (remote_write_file(server_env.get_SSH_INFO(), file) != 0) {
std::cerr << "Failed to write file " << file.filename << std::endl;
return 1;
}
std::cout << "Wrote file " << file.filename << " on " << server_name << std::endl;
}
return 0;