From f0ba8c3e63f0e89d76accfb2967f68b815f6a228 Mon Sep 17 00:00:00 2001 From: Manuel Gutierrez Date: Thu, 2 Apr 2020 18:53:59 +0200 Subject: [PATCH 1/2] Save complete queue directory --- wazuh/config/data_dirs.env | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/wazuh/config/data_dirs.env b/wazuh/config/data_dirs.env index b91f4cc7..1cf3020a 100644 --- a/wazuh/config/data_dirs.env +++ b/wazuh/config/data_dirs.env @@ -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 From 9b329b095ea893df61e96ea98cdc395781209dac Mon Sep 17 00:00:00 2001 From: Manuel Gutierrez Date: Mon, 6 Apr 2020 21:27:50 +0200 Subject: [PATCH 2/2] Copy missing files from queue-template --- wazuh/config/00-wazuh.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/wazuh/config/00-wazuh.sh b/wazuh/config/00-wazuh.sh index 4becb6bb..d4ffe63b 100644 --- a/wazuh/config/00-wazuh.sh +++ b/wazuh/config/00-wazuh.sh @@ -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 @@ -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 \ No newline at end of file +popd