Skip to content
Snippets Groups Projects
Commit bfaa5219 authored by Lais Frigerio's avatar Lais Frigerio
Browse files
parent 76b447ef
No related branches found
No related tags found
No related merge requests found
Pipeline #
......@@ -101,7 +101,6 @@ bool Curl::downloadAgent(std::string url, std::fstream* logFile,
fclose(fp);
// run agent.run
system("pwd");
execute_agent(tmp_dot_run);
// remove agent tmp directory
......
......@@ -46,7 +46,11 @@ int check_update() {
agent.setLogDir("/log/");
create_directories(agent);
agent.setLogFile("datasid-agent.log");
agent.setDirInstall("/opt/agentc3sl");
#ifdef __linux
agent.setDirInstall("/opt/agentc3sl");
#endif
std::fstream logFile(agent.getLogFile().c_str(), std::fstream::app);
/* run common.cpp to make parse from config and proxy file */
......@@ -121,7 +125,6 @@ int check_update() {
*/
bool compare_version(Agent *agent, std::string version,
std::fstream* logFile) {
return true;
if (!strcmp(version.c_str(), "")) {
agent->setMessage(__DATE__ +
std::string(" - ERROR: Server returned an empty version string."));
......@@ -147,7 +150,7 @@ bool compare_version(Agent *agent, std::string version,
*/
bool download(Conf conf, Agent* agent, std::fstream* logFile) {
Curl curl;
if (curl.downloadAgent("file:///home/lais/Imagens/agent/agent-0.run",
if (curl.downloadAgent(conf.getWebService(),
logFile, agent))
return true;
return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment