Skip to content

Commit

Permalink
Merge pull request #323 from wazuh/bugfix-agent-timestamp
Browse files Browse the repository at this point in the history
Save queue directory
  • Loading branch information
Manuel J. Bernal authored Apr 8, 2020
2 parents edae7d3 + 9b329b0 commit 9fc6892
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
11 changes: 10 additions & 1 deletion wazuh/config/00-wazuh.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@ then
fi
rm /var/ossec/queue/db/.template.db

# copy missing files from queue-template (in case this is an upgrade from previous versions)
for filename in /var/ossec/queue-template/*; do
fname=$(basename $filename)
echo $fname
if test ! -e "/var/ossec/data/queue/$fname"; then
cp -rp "/var/ossec/queue-template/$fname" /var/ossec/data/queue/
fi
done

touch ${DATA_PATH}/process_list
chgrp ossec ${DATA_PATH}/process_list
chmod g+rw ${DATA_PATH}/process_list
Expand Down Expand Up @@ -143,4 +152,4 @@ echo "Change Wazuh API user credentials"
change_user="node htpasswd -b -c user $API_USER $API_PASS"
eval $change_user

popd
popd
10 changes: 1 addition & 9 deletions wazuh/config/data_dirs.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,6 @@ i=0
DATA_DIRS[((i++))]="api/configuration"
DATA_DIRS[((i++))]="etc"
DATA_DIRS[((i++))]="logs"
DATA_DIRS[((i++))]="queue/db"
DATA_DIRS[((i++))]="queue/rootcheck"
DATA_DIRS[((i++))]="queue/agent-groups"
DATA_DIRS[((i++))]="queue/agent-info"
DATA_DIRS[((i++))]="queue/agents-timestamp"
DATA_DIRS[((i++))]="queue/agentless"
DATA_DIRS[((i++))]="queue/cluster"
DATA_DIRS[((i++))]="queue/rids"
DATA_DIRS[((i++))]="queue/fts"
DATA_DIRS[((i++))]="queue"
DATA_DIRS[((i++))]="var/multigroups"
export DATA_DIRS

0 comments on commit 9fc6892

Please sign in to comment.