rename INSTALL type for starting issue 136

This commit is contained in:
m0duspwnens
2020-02-28 11:11:24 -05:00
parent f40b23e4b2
commit 6c8d6812f9
3 changed files with 26 additions and 25 deletions

View File

@@ -31,7 +31,6 @@ fi
# Global Variables
HOSTNAME=$(cat /etc/hostname)
MINION_ID=$(echo $HOSTNAME | awk -F. {'print $1'})
TOTAL_MEM=`grep MemTotal /proc/meminfo | awk '{print $2}' | sed -r 's/.{3}$//'`
NICS=$(ip link | awk -F: '$0 !~ "lo|vir|veth|br|docker|wl|^[^0-9]"{print $2 " \"" "Interface" "\"" " OFF"}')
CPUCORES=$(cat /proc/cpuinfo | grep processor | wc -l)
@@ -120,6 +119,8 @@ if (whiptail_you_sure) ; then
# What kind of install are we doing?
whiptail_install_type
SHORTNAME=$(echo $HOSTNAME | awk -F. {'print $1'})
MINION_ID=$(echo $SHORTNAME'_'$INSTALLTYPE | tr '[:upper:]' '[:lower:]')
# How do we want to handle OS patching? manual, auto or scheduled days and hours
whiptail_patch_schedule
@@ -252,7 +253,7 @@ if (whiptail_you_sure) ; then
####################
## Master ##
####################
if [ $INSTALLTYPE == 'MASTERONLY' ]; then
if [ $INSTALLTYPE == 'MASTER' ]; then
# Would you like to do an advanced install?
whiptail_master_adv
@@ -437,7 +438,7 @@ if (whiptail_you_sure) ; then
## Sensor ##
####################
if [ $INSTALLTYPE == 'SENSORONLY' ]; then
if [ $INSTALLTYPE == 'SENSOR' ]; then
filter_unused_nics
whiptail_bond_nics
whiptail_management_server
@@ -520,12 +521,12 @@ if (whiptail_you_sure) ; then
## Eval Mode or Master Search ##
#######################################
if [ $INSTALLTYPE == 'EVALMODE' ] || [ $INSTALLTYPE == 'MASTERSEARCH' ]; then
if [ $INSTALLTYPE == 'EVAL' ] || [ $INSTALLTYPE == 'MASTERSEARCH' ]; then
# Filter out the management NIC
filter_unused_nics
if [ $INSTALLTYPE == 'EVALMODE' ]; then
if [ $INSTALLTYPE == 'EVAL' ]; then
TYPE='eval'
# Select which NICs are in the bond
whiptail_bond_nics
@@ -585,7 +586,7 @@ if (whiptail_you_sure) ; then
add_socore_user_master
{
sleep 0.5
if [ $INSTALLTYPE == 'EVALMODE' ]; then
if [ $INSTALLTYPE == 'EVAL' ]; then
echo -e "XXX\n0\nCreating Bond Interface... \nXXX"
create_sensor_bond >> $SETUPLOG 2>&1
fi
@@ -660,7 +661,7 @@ if (whiptail_you_sure) ; then
echo -e "XXX\n45\nInstalling Kibana... \nXXX"
salt-call state.apply kibana >> $SETUPLOG 2>&1
if [ $INSTALLTYPE == 'EVALMODE' ]; then
if [ $INSTALLTYPE == 'EVAL' ]; then
echo -e "XXX\n50\nInstalling pcap... \nXXX"
salt-call state.apply pcap >> $SETUPLOG 2>&1
echo -e "XXX\n52\nInstalling Suricata... \nXXX"