mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
40 lines
1010 B
Bash
40 lines
1010 B
Bash
#!/bin/bash
|
|
|
|
total_mem=$(grep MemTotal /proc/meminfo | awk '{print $2}' | sed -r 's/.{3}$//')
|
|
export total_mem
|
|
|
|
hostname=$(cat /etc/hostname)
|
|
export hostname
|
|
|
|
all_nics=$(ip link | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2 " \"" "Interface" "\"" " OFF"}')
|
|
export all_nics
|
|
|
|
cpu_cores=$(grep -c "processor" /proc/cpuinfo | grep -v "KVM")
|
|
export cpu_cores
|
|
|
|
cpu_core_list=$(grep "processor" /proc/cpuinfo | grep -v "KVM" | awk '{print $3 " \"" "core" "\""}')
|
|
export cpu_core_list
|
|
|
|
random_uid=$(</dev/urandom tr -dc 'a-zA-Z0-9' | fold -w 16 | head -n 1)
|
|
export random_uid
|
|
|
|
node_es_port=9200
|
|
export node_es_port
|
|
|
|
setup_log="/root/sosetup.log"
|
|
export setup_log
|
|
|
|
filesystem_root=$(df / | awk '$3 ~ /[0-9]+/ { print $2 * 1000 }')
|
|
export filesystem_root
|
|
|
|
mkdir -p /nsm
|
|
filesystem_nsm=$(df /nsm | awk '$3 ~ /[0-9]+/ { print $2 * 1000 }')
|
|
export filesystem_nsm
|
|
|
|
mkdir -p /root/installtmp/pillar/minions
|
|
export temp_install_dir=/root/installtmp
|
|
|
|
export percentage=0
|
|
|
|
export percentage_str='Getting started'
|