Fix copy except files (#238)

This commit is contained in:
Mayte Ariza
2019-09-06 10:42:39 +02:00
committed by Jesús Linares
parent c427c971a4
commit bd2fa5c40d

View File

@@ -71,6 +71,12 @@ apply_exclusion_data() {
for exclusion_file in "${PERMANENT_DATA_EXCP[@]}"; do
if [ -e ${WAZUH_INSTALL_PATH}/data_tmp/exclusion/${exclusion_file} ]
then
DIR=$(dirname "${exclusion_file}")
if [ ! -e ${DIR} ]
then
mkdir -p ${DIR}
fi
print "Updating ${exclusion_file}"
exec_cmd "cp -p ${WAZUH_INSTALL_PATH}/data_tmp/exclusion/${exclusion_file} ${exclusion_file}"
fi