Remote create not working yet.
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled
This commit is contained in:
parent
a68e31eb6b
commit
49b1475ffd
@ -84,7 +84,11 @@ namespace dropshell {
|
|||||||
// create the sh file on the remote server.
|
// create the sh file on the remote server.
|
||||||
for (const auto &file : agent_files) {
|
for (const auto &file : agent_files) {
|
||||||
// write out the file contents in the file.
|
// 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;
|
return 0;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include "templates.hpp"
|
#include "templates.hpp"
|
||||||
#include "shared_commands.hpp"
|
#include "shared_commands.hpp"
|
||||||
#include "utils/hash.hpp"
|
#include "utils/hash.hpp"
|
||||||
|
#include "utils/createagent.hpp"
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
@ -329,6 +329,8 @@ namespace dropshell
|
|||||||
else
|
else
|
||||||
std::cout << "Downloaded bb64 to " << agent_path << " on remote server." << std::endl;
|
std::cout << "Downloaded bb64 to " << agent_path << " on remote server." << std::endl;
|
||||||
|
|
||||||
|
// now create the agent.
|
||||||
|
create_agent(server);
|
||||||
|
|
||||||
return 0; // NOTIMPL
|
return 0; // NOTIMPL
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,11 @@ namespace dropshell {
|
|||||||
// create the sh file on the remote server.
|
// create the sh file on the remote server.
|
||||||
for (const auto &file : agent_files) {
|
for (const auto &file : agent_files) {
|
||||||
// write out the file contents in the file.
|
// 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;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user