...
 
Commits (9)
......@@ -9,6 +9,7 @@ stages:
pattern:
stage: lint
image: 'debian:stretch'
tags:
- regular
- debian
......@@ -21,6 +22,7 @@ pattern:
compileUnix:
stage: build
image: 'debian:stretch'
artifacts:
paths:
- agent-1234.run
......@@ -29,7 +31,7 @@ compileUnix:
- debian
script:
- echo "Estágio 'build'"
- apt-get update && apt-get install -y build-essential cmake git makeself
- apt-get update && apt-get install -y build-essential cmake git makeself libc6
libudev-dev
- git submodule init
- git submodule update --init --recursive
......@@ -93,6 +95,7 @@ compileWin64:
testDebian:
stage: test
image: 'debian:stretch'
tags:
- regular
- debian
......
......@@ -26,7 +26,7 @@ if(WIN32)
set(Threads_FOUND TRUE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static -lwinpthread -static-libstdc++ -static-libgcc")
else()
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lpthread " )
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lpthread" )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libstdc++ -static-libgcc")
endif()
......
......@@ -49,9 +49,9 @@ int send_inventory(bool print, Agent* agent) {
else if (agent->getConnection()->sendJson(agent,
fastWriter.write(inventory), 1, 1) == 200)
return 1;
} else {
return 0;
}
return 0;
}
/***************************************
......@@ -82,9 +82,9 @@ int send_net_bandwidth(bool print, Agent* agent) {
else if (agent->getConnection()->sendJson(agent,
fastWriter.write(net), 2, 1) == 200)
return 1;
} else {
return 0;
}
return 0;
}
/**********************************
......@@ -115,9 +115,9 @@ int send_user_history(bool print, Agent* agent) {
else if (agent->getConnection()->sendJson(agent,
fastWriter.write(u_h), 3, 1) == 200)
return 1;
} else {
return 0;
}
return 0;
}
/**
......
......@@ -2,7 +2,14 @@
/opt/agentC3SL/agent-v* --print --once > export.json
echo $? > exit_status
# retrieve data , clean data and turn into a clean json
echo "{" > inventory.json && jq ."data_inventory" export.json | awk '/{/{flag=1;next}/}/{flag=0}flag' >> inventory.json && echo "}" >> inventory.json
echo "{" > net.json && jq ."data_net" export.json | awk '/{/{flag=1;next}/}/{flag=0}flag' >> net.json && echo "}" >> net.json
echo "export.json"
cat export.json
echo "inventory"
cat inventory.json
cat net.json
\ No newline at end of file
echo "net"
cat net.json
echo "exit status"
cat exit_status