wazuh / wazuh-packages

Wazuh - Tools for packages creation
https://wazuh.com
GNU General Public License v2.0
105 stars 96 forks source link

Unattended_installation (All in one) script not working in Docker instances #1038

Open VictorMorenoJimenez opened 4 years ago

VictorMorenoJimenez commented 4 years ago

Hi team, To launch tests that ensure the correct operation of the script in different operating systems, we need it to work in Docker.

While executing unattended_installation script I have found some issues:

  ## Health check
  healthCheck() {

      cores=$(cat /proc/cpuinfo | grep processor | wc -l)
      ram_gb=$(free -m | awk '/^Mem:/{print $2}')

      if [[ ${cores} < "2" ]] || [[ ${ram_gb} < "3700" ]]; then
          echo "Your system does not meet the recommended minimum hardware requirements of 4Gb of RAM and 2 CPU cores. If you want to proceed with the installation use the -i option to ignore these requirements."
          exit 1;
      elif [[ -f /etc/elasticsearch/elasticsearch.yml ]] && [[ -f /etc/kibana/kibana.yml ]] && [[ -f /etc/filebeat/filebeat.yml ]]; then
          echo "All the componets have already been installed."
          exit 1;
      else
          echo "Starting the installation..."
      fi
 }

Thanks team.

diagonalciso commented 3 years ago

For Debian 10, add gnupg to the list of necessary utilities for the installation, that will fix this.

Selection_020