From 594f7b5536897dc3935f71f433401e8d0429f930 Mon Sep 17 00:00:00 2001 From: quebim Date: Tue, 12 Nov 2024 16:33:15 -0300 Subject: [PATCH] Copy demo certificates installed to assable's temporary directory --- build-scripts/assemble.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/build-scripts/assemble.sh b/build-scripts/assemble.sh index 3c451a6a60c64..a16f469ae1012 100644 --- a/build-scripts/assemble.sh +++ b/build-scripts/assemble.sh @@ -190,8 +190,10 @@ function add_wazuh_tools() { curl -sL "${download_url}/config.yml" -o "$PATH_PLUGINS"/opensearch-security/tools/config.yml curl -sL "${download_url}/wazuh-passwords-tool.sh" -o "$PATH_PLUGINS"/opensearch-security/tools/wazuh-passwords-tool.sh curl -sL "${download_url}/wazuh-certs-tool.sh" -o "$PATH_PLUGINS"/opensearch-security/tools/wazuh-certs-tool.sh - # Include script to install demo certificates - cp distribution/packages/src/common/scripts/install-demo-certificates.sh "$PATH_PLUGINS"/opensearch-security/tools/ +} + +function add_demo_certs_installer() { + cp install-demo-certificates.sh "$PATH_PLUGINS"/opensearch-security/tools/ } # ==== @@ -283,6 +285,7 @@ function assemble_tar() { # Install plugins install_plugins "${version}" fix_log_rotation "${PATH_CONF}" + add_demo_certs_installer # Swap configuration files add_configuration_files remove_unneeded_files @@ -323,6 +326,7 @@ function assemble_rpm() { install_plugins "${version}" fix_log_rotation ${PATH_CONF} enable_performance_analyzer_rca ${src_path} + add_demo_certs_installer # Swap configuration files add_configuration_files remove_unneeded_files @@ -377,6 +381,7 @@ function assemble_deb() { install_plugins "${version}" fix_log_rotation ${PATH_CONF} enable_performance_analyzer_rca ${src_path} + add_demo_certs_installer # Swap configuration files add_configuration_files remove_unneeded_files @@ -422,6 +427,8 @@ function main() { TMP_DIR="${OUTPUT}/tmp/${TARGET}" mkdir -p "$TMP_DIR" cp "${OUTPUT}/dist/$ARTIFACT_BUILD_NAME" "${TMP_DIR}" + # Copy the demo certificates generator + cp distribution/packages/src/common/scripts/install-demo-certificates.sh "$TMP_DIR" case $PACKAGE in tar)