Skip to content

Commit

Permalink
chore(filebeat): fix arch check
Browse files Browse the repository at this point in the history
  • Loading branch information
kalingth committed Jul 19, 2024
1 parent a5da0f2 commit 4118300
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions wazuh-manager/config/filebeat_module.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,19 @@ elif [ "$MAJOR_BUILD" -eq "$MAJOR_CURRENT" ]; then
fi
fi

curl -L -O https://artifacts.elastic.co/downloads/beats/filebeat/${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-arm64.deb &&\
dpkg -i ${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-arm64.deb && rm -f ${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-arm64.deb && \

function getArch() {
case $(arch) in
'aarch64') echo "${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-arm64.deb" ;;
'x86_64') echo "${FILEBEAT_CHANNEL}-${FILEBEAT_VERSION}-amd64.deb" ;;
*)
echo "Architecture $(arch) not supported" >> /dev/stderr;
exit 1;
;;
esac
}

FILEBEAT_PKG=$(getArch);
curl -L -O "https://artifacts.elastic.co/downloads/beats/filebeat/${FILEBEAT_PKG}" &&\
dpkg -i "${FILEBEAT_PKG}" && rm -f "${FILEBEAT_PKG}" && \
curl -s https://${REPOSITORY}/filebeat/${WAZUH_FILEBEAT_MODULE} | tar -xvz -C /usr/share/filebeat/module

0 comments on commit 4118300

Please sign in to comment.