forked from wazuh/wazuh-docker
Merge pull request #625 from wazuh/622-ErrorInCP-to4.3
Error while copying multigroups files during second Docker deployment
This commit is contained in:
@@ -41,12 +41,18 @@ exec_cmd_stdout() {
|
|||||||
|
|
||||||
mount_permanent_data() {
|
mount_permanent_data() {
|
||||||
for permanent_dir in "${PERMANENT_DATA[@]}"; do
|
for permanent_dir in "${PERMANENT_DATA[@]}"; do
|
||||||
|
data_tmp="${WAZUH_INSTALL_PATH}/data_tmp/permanent${permanent_dir}/"
|
||||||
|
print ${data_tmp}
|
||||||
# Check if the path is not empty
|
# Check if the path is not empty
|
||||||
if find ${permanent_dir} -mindepth 1 | read; then
|
if find ${permanent_dir} -mindepth 1 | read; then
|
||||||
print "The path ${permanent_dir} is already mounted"
|
print "The path ${permanent_dir} is already mounted"
|
||||||
else
|
else
|
||||||
print "Installing ${permanent_dir}"
|
if find ${data_tmp} -mindepth 1 | read; then
|
||||||
exec_cmd "cp -a ${WAZUH_INSTALL_PATH}/data_tmp/permanent${permanent_dir}/. ${permanent_dir}"
|
print "Installing ${permanent_dir}"
|
||||||
|
exec_cmd "cp -a ${data_tmp}. ${permanent_dir}"
|
||||||
|
else
|
||||||
|
print "The path ${permanent_dir} is empty, skiped"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user