From cca408e2d80f01e49d15ccd93774b1fef59e35d9 Mon Sep 17 00:00:00 2001 From: m0duspwnens Date: Fri, 10 Apr 2020 16:15:43 -0400 Subject: [PATCH] change log_size_limit logic - https://github.com/Security-Onion-Solutions/securityonion-saltstack/issues/551 --- setup/so-common-functions | 9 +++++++++ setup/so-whiptail | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/setup/so-common-functions b/setup/so-common-functions index b80fc4920..2419f0659 100644 --- a/setup/so-common-functions +++ b/setup/so-common-functions @@ -33,6 +33,15 @@ calculate_useable_cores() { set_defaul_log_size() { + case $INSTALLTYPE in + EVAL | HEAVYNODE) + PERCENTAGE=50 + ;; + *) + PERCENTAGE=80 + ;; + esac + local disk_dir="/" if [ -d /nsm ]; then disk_dir="/nsm" diff --git a/setup/so-whiptail b/setup/so-whiptail index 24aa1ad22..513dc3fe1 100755 --- a/setup/so-whiptail +++ b/setup/so-whiptail @@ -388,7 +388,7 @@ whiptail_log_size_limit() { log_size_limit=$(whiptail --title "Security Onion Setup" --inputbox \ "Please specify the amount of disk space (in GB) you would like to allocate for Elasticsearch data storage. \ - By default, this is set to 85% of the disk space allotted for /nsm." 10 75 "$log_size_limit" 3>&1 1>&2 2>&3) + By default, this is set to 80% of the disk space allotted for /nsm." 10 75 "$log_size_limit" 3>&1 1>&2 2>&3) local exitstatus=$? whiptail_check_exitstatus $exitstatus