Skip to content
Snippets Groups Projects
Commit 9fde97ee authored by Edileuton Henrique de Oliveira's avatar Edileuton Henrique de Oliveira
Browse files

agent: The date of the netusage inventory's send is kept of the previous agent

parent 755809da
No related branches found
No related tags found
No related merge requests found
......@@ -110,6 +110,7 @@ PKG_LINE=
DATASID_HOME="/opt/datasid"
LOGFILE=/tmp/collected-information.log
LASTEXEC="${DATASID_HOME}/data/lastexec"
NETLASTEXEC="${DATASID_HOME}/data/netlastexec"
if test "$(id -u)" -ne 0; then
printf "Este instalador nescessita privilégios de administrador (root).\n"
......@@ -152,6 +153,10 @@ if test -f ${LASTEXEC}; then
LASTEXECBACKUP=$(cat ${LASTEXEC})
fi
if test -f ${NETLASTEXEC}; then
NETLASTEXECBACKUP=$(cat ${NETLASTEXEC})
fi
printf "Extraindo pacote e verificando MD5... " >&3
# Uncompress tar package to temp file
......@@ -285,6 +290,10 @@ if ! test -z ${LASTEXECBACKUP};then
echo ${LASTEXECBACKUP} > ${LASTEXEC}
fi
if ! test -z ${NETLASTEXECBACKUP};then
echo ${NETLASTEXECBACKUP} > ${NETLASTEXEC}
fi
# Run the agent and check if its execution was alright, exiting in case of error
su -c "bash ${DATASID_HOME}/bin/datasid-agent.sh" datasid
RETVAL=$?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment