Skip to content

Commit

Permalink
Merge pull request #917 from wazuh/4.2.3-bump-unattended
Browse files Browse the repository at this point in the history
Bump unattended scripts to 4.2.3
  • Loading branch information
José Fernández Aguilera authored Oct 5, 2021
2 parents c9fe607 + 22e17bf commit ddde858
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 485 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.2.2
4.2.3
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@
# License (version 2) as published by the FSF - Free Software
# Foundation.

WAZUH_VER="4.2.3"
WAZUH_REV="1"
ELK_VER="7.12.1"
WAZUH_KIB_PLUG_REV="1"

## Check if system is based on yum or apt-get or zypper
char="."
debug='> /dev/null 2>&1'
Expand Down Expand Up @@ -228,13 +233,13 @@ installElasticsearch() {

if [ $sys_type == "yum" ]
then
eval "yum install elasticsearch-7.11.2 -y -q $debug"
eval "yum install elasticsearch-${ELK_VER} -y -q $debug"
elif [ $sys_type == "apt-get" ]
then
eval "apt-get install elasticsearch=7.11.2 -y -q $debug"
eval "apt-get install elasticsearch=${ELK_VER} -y -q $debug"
elif [ $sys_type == "zypper" ]
then
eval "zypper -n install elasticsearch-7.11.2 $debug"
eval "zypper -n install elasticsearch-${ELK_VER} $debug"
fi

if [ "$?" != 0 ]
Expand Down Expand Up @@ -300,13 +305,13 @@ installFilebeat() {
logger "Installing Filebeat..."
if [ $sys_type == "yum" ]
then
eval "yum install filebeat-7.11.2 -y -q $debug"
eval "yum install filebeat-${ELK_VER} -y -q $debug"
elif [ $sys_type == "zypper" ]
then
eval "zypper -n install filebeat-7.11.2 $debug"
eval "zypper -n install filebeat-${ELK_VER} $debug"
elif [ $sys_type == "apt-get" ]
then
eval "apt-get install filebeat=7.11.2 -y -q $debug"
eval "apt-get install filebeat=${ELK_VER} -y -q $debug"
fi
if [ "$?" != 0 ]
then
Expand Down Expand Up @@ -337,13 +342,13 @@ installKibana() {
logger "Installing Kibana..."
if [ $sys_type == "yum" ]
then
eval "yum install kibana-7.11.2 -y -q $debug"
eval "yum install kibana-${ELK_VER} -y -q $debug"
elif [ $sys_type == "zypper" ]
then
eval "zypper -n install kibana-7.11.2 $debug"
eval "zypper -n install kibana-${ELK_VER} $debug"
elif [ $sys_type == "apt-get" ]
then
eval "apt-get install kibana=7.11.2 -y -q $debug"
eval "apt-get install kibana=${ELK_VER} -y -q $debug"
fi
if [ "$?" != 0 ]
then
Expand All @@ -354,7 +359,7 @@ installKibana() {
eval "mkdir /usr/share/kibana/data ${debug}"
eval "chown -R kibana:kibana /usr/share/kibana/ ${debug}"
eval "cd /usr/share/kibana ${debug}"
eval "sudo -u kibana /usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/4.x/ui/kibana/wazuh_kibana-4.2.2_7.11.2-1.zip ${debug}"
eval "sudo -u kibana /usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/4.x/ui/kibana/wazuh_kibana-${WAZUH_VER}_${ELK_VER}-${WAZUH_KIB_PLUG_REV}.zip ${debug}"
if [ "$?" != 0 ]; then
echo "Error: Wazuh Kibana plugin could not be installed."
exit 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,12 @@
# License (version 2) as published by the FSF - Free Software
# Foundation.

WAZUH_MAJOR="4.2"
WAZUH_VER="4.2.3"
WAZUH_REV="1"
ELK_VER="7.12.1"
WAZUH_KIB_PLUG_REV="1"

## Check if system is based on yum or apt-get
char="."
debug='> /dev/null 2>&1'
Expand Down Expand Up @@ -215,13 +221,13 @@ installElasticsearch() {

if [ $sys_type == "yum" ]
then
eval "yum install elasticsearch-7.11.2 -y -q $debug"
eval "yum install elasticsearch-${ELK_VER} -y -q $debug"
elif [ $sys_type == "apt-get" ]
then
eval "apt-get install elasticsearch=7.11.2 -y -q $debug"
eval "apt-get install elasticsearch=${ELK_VER} -y -q $debug"
elif [ $sys_type == "zypper" ]
then
eval "zypper -n install elasticsearch-7.11.2 $debug"
eval "zypper -n install elasticsearch-${ELK_VER} $debug"
fi

if [ "$?" != 0 ]
Expand Down Expand Up @@ -419,13 +425,13 @@ installKibana() {
logger "Installing Kibana..."
if [ $sys_type == "yum" ]
then
eval "yum install kibana-7.11.2 -y -q $debug"
eval "yum install kibana-${ELK_VER} -y -q $debug"
elif [ $sys_type == "zypper" ]
then
eval "zypper -n install kibana-7.11.2 $debug"
eval "zypper -n install kibana-${ELK_VER} $debug"
elif [ $sys_type == "apt-get" ]
then
eval "apt-get install kibana=7.11.2 -y -q $debug"
eval "apt-get install kibana=${ELK_VER} -y -q $debug"
fi
if [ "$?" != 0 ]
then
Expand All @@ -437,7 +443,7 @@ installKibana() {
eval "mkdir /usr/share/kibana/data ${debug}"
eval "chown -R kibana:kibana /usr/share/kibana/ ${debug}"
eval "cd /usr/share/kibana ${debug}"
eval "sudo -u kibana /usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/4.x/ui/kibana/wazuh_kibana-4.2.2_7.11.2-1.zip ${debug}"
eval "sudo -u kibana /usr/share/kibana/bin/kibana-plugin install https://packages.wazuh.com/4.x/ui/kibana/wazuh_kibana-${WAZUH_VER}_${ELK_VER}-${WAZUH_KIB_PLUG_REV}.zip ${debug}"
if [ "$?" != 0 ]; then
echo "Error: Wazuh Kibana plugin could not be installed."
exit 1;
Expand Down
Loading

0 comments on commit ddde858

Please sign in to comment.