This commit is contained in:
m0duspwnens
2020-04-10 16:15:43 -04:00
parent 6aafc4ef01
commit 69031ab6b2
2 changed files with 20 additions and 10 deletions

View File

@@ -720,15 +720,25 @@ get_filesystem_nsm(){
get_log_size_limit() { get_log_size_limit() {
DISK_DIR="/" case $INSTALLTYPE in
if [ -d /nsm ]; then EVAL | HEAVYNODE)
DISK_DIR="/nsm" PERCENTAGE=50
fi ;;
DISK_SIZE_K=`df $DISK_DIR |grep -v "^Filesystem" | awk '{print $2}'` *)
PERCENTAGE=85 PERCENTAGE=80
DISK_SIZE=DISK_SIZE_K*1000 ;;
PERCENTAGE_DISK_SPACE=`echo $(($DISK_SIZE*$PERCENTAGE/100))` esac
LOG_SIZE_LIMIT=$(($PERCENTAGE_DISK_SPACE/1000000000))
DISK_DIR="/"
if [ -d /nsm ]; then
DISK_DIR="/nsm"
fi
DISK_SIZE_K=`df $DISK_DIR |grep -v "^Filesystem" | awk '{print $2}'`
DISK_SIZE=DISK_SIZE_K*1000
PERCENTAGE_DISK_SPACE=`echo $(($DISK_SIZE*$PERCENTAGE/100))`
LOG_SIZE_LIMIT=$(($PERCENTAGE_DISK_SPACE/1000000000))
} }

View File

@@ -309,7 +309,7 @@ whiptail_log_size_limit() {
LOG_SIZE_LIMIT=$(whiptail --title "Security Onion Setup" --inputbox \ 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. \ "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=$? local exitstatus=$?
whiptail_check_exitstatus $exitstatus whiptail_check_exitstatus $exitstatus