Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed filebeat module URL #2405

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions unattended_installer/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ readonly resources_certs="${base_path_builder}/cert_tool"
readonly resources_passwords="${base_path_builder}/passwords_tool"
readonly resources_common="${base_path_builder}/common_functions"
readonly resources_download="${base_path_builder}/downloader"
readonly source_branch="4.6.0"
source_branch="v4.6.0"

function getHelp() {

Expand Down Expand Up @@ -48,9 +48,6 @@ function getHelp() {

function buildInstaller() {

checkDistDetectURL
checkFilebeatURL

output_script_path="${base_path_builder}/wazuh-install.sh"

## Create installer script
Expand All @@ -77,6 +74,8 @@ function buildInstaller() {
echo 'readonly filebeat_wazuh_module="${repobaseurl}/filebeat/wazuh-filebeat-0.2.tar.gz"' >> "${output_script_path}"
echo 'readonly bucket="packages-dev.wazuh.com"' >> "${output_script_path}"
echo 'readonly repository="'"${devrepo}"'"' >> "${output_script_path}"
sed -i 's|v${wazuh_version}|${wazuh_version}|g' "${resources_installer}/installVariables.sh"
source_branch="4.6.0"
else
echo 'readonly repogpg="https://packages.wazuh.com/key/GPG-KEY-WAZUH"' >> "${output_script_path}"
echo 'readonly repobaseurl="https://packages.wazuh.com/4.x"' >> "${output_script_path}"
Expand Down Expand Up @@ -133,6 +132,9 @@ function buildInstaller() {
echo >> "${output_script_path}"
echo "main \"\$@\"" >> "${output_script_path}"

checkDistDetectURL
checkFilebeatURL

}

function buildPasswordsTool() {
Expand Down Expand Up @@ -263,7 +265,10 @@ function builder_main() {
buildInstaller
chmod 500 ${output_script_path}
if [ -n "${change_filebeat_url}" ]; then
sed -i -E "s|(https.+)master(.+wazuh-template.json)|\1\\$\\{wazuh_major\\}\2|" "${resources_installer}/installVariables.sh"
sed -i -E "s|(https.+)master(.+wazuh-template.json)|\1\\$\\{source_branch\\}\2|" "${resources_installer}/installVariables.sh"
fi
if [ -n "${development}" ]; then
sed -i 's|${wazuh_version}|v${wazuh_version}|g' "${resources_installer}/installVariables.sh"
fi
fi

Expand Down
3 changes: 2 additions & 1 deletion unattended_installer/install_functions/installVariables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ readonly wazuh_major="4.6"
readonly wazuh_version="4.6.0"
readonly filebeat_version="7.10.2"
readonly wazuh_install_vesion="0.1"
readonly source_branch="v${wazuh_version}"

## Links and paths to resources
readonly resources="https://${bucket}/${wazuh_major}"
Expand All @@ -21,7 +22,7 @@ config_file="${base_path}/config.yml"
readonly tar_file_name="wazuh-install-files.tar"
tar_file="${base_path}/${tar_file_name}"

readonly filebeat_wazuh_template="https://raw.githubusercontent.com/wazuh/wazuh/${wazuh_major}/extensions/elasticsearch/7.x/wazuh-template.json"
readonly filebeat_wazuh_template="https://raw.githubusercontent.com/wazuh/wazuh/${source_branch}/extensions/elasticsearch/7.x/wazuh-template.json"

readonly dashboard_cert_path="/etc/wazuh-dashboard/certs"
readonly filebeat_cert_path="/etc/filebeat/certs"
Expand Down
Loading