mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-21 08:23:08 +01:00
Merge branch 'dev' of github.com:Security-Onion-Solutions/securityonion-saltstack into dev
This commit is contained in:
@@ -112,5 +112,5 @@ strelka_filestream:
|
||||
strelka_zeek_extracted_sync:
|
||||
cron.present:
|
||||
- user: root
|
||||
- name: [ -d /nsm/zeek/extracted/complete/ ] && mv /nsm/zeek/extracted/complete/* /nsm/strelka/ > /dev/null 2>&1
|
||||
- name: '[ -d /nsm/zeek/extracted/complete/ ] && mv /nsm/zeek/extracted/complete/* /nsm/strelka/ > /dev/null 2>&1'
|
||||
- minute: '*'
|
||||
|
||||
@@ -28,6 +28,8 @@ automation=$2
|
||||
|
||||
automated=no
|
||||
|
||||
echo "---- Starting setup at $(date -u) ----" >> $setup_log 2>&1
|
||||
|
||||
function progress() {
|
||||
if [ $automated == no ]; then
|
||||
whiptail --title "Security Onion Install" --gauge 'Please wait while installing' 6 60 0
|
||||
@@ -35,31 +37,36 @@ function progress() {
|
||||
}
|
||||
|
||||
if [[ -f automation/$automation && $(basename $automation) == $automation ]]; then
|
||||
echo "Preselecting variable values based on automated setup: $automation"
|
||||
echo "Preselecting variable values based on automated setup: $automation" >> $setup_log 2>&1
|
||||
source automation/$automation
|
||||
automated=yes
|
||||
|
||||
echo "Checking network configuration" >> $setup_log 2>&1g
|
||||
ip a >> $setup_log 2>&1
|
||||
|
||||
attempt=1
|
||||
attempts=60
|
||||
ip a | grep "$MNIC:" | grep "state UP"
|
||||
ip a | grep "$MNIC:" | grep "state UP" >> $setup_log 2>&1
|
||||
while [ $? -ne 0 ]; do
|
||||
ip a >> $setup_log 2>&1
|
||||
if [ $attempt -gt $attempts ]; then
|
||||
echo "Network unavailable - setup cannot continue"
|
||||
echo "Network unavailable - setup cannot continue" >> $setup_log 2>&1
|
||||
exit 1
|
||||
fi
|
||||
echo "Waiting for network to come up (attempt $attempt of $attempts)"
|
||||
echo "Waiting for network to come up (attempt $attempt of $attempts)" >> $setup_log 2>&1
|
||||
attempt=$((attempt + 1))
|
||||
sleep 10;
|
||||
ip a | grep "$MNIC:" | grep "state UP"
|
||||
ip a | grep "$MNIC:" | grep "state UP" >> $setup_log 2>&1
|
||||
done
|
||||
echo "Network is up on $MNIC" >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
case "$setup_type" in
|
||||
iso | network) # Accepted values
|
||||
echo "Beginning Security Onion $setup_type install"
|
||||
echo "Beginning Security Onion $setup_type install" >> $setup_log 2>&1
|
||||
;;
|
||||
*)
|
||||
echo "Invalid install type, must be 'iso' or 'network'"
|
||||
echo "Invalid install type, must be 'iso' or 'network'" | tee $setup_log
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
@@ -67,8 +74,6 @@ esac
|
||||
# Allow execution of SO tools during setup
|
||||
export PATH=$PATH:../salt/common/tools/sbin
|
||||
|
||||
date -u > $setup_log 2>&1
|
||||
|
||||
got_root
|
||||
|
||||
if [[ $# -gt 1 ]]; then
|
||||
@@ -87,7 +92,7 @@ setterm -blank 0
|
||||
if [ "$setup_type" == 'iso' ] || (whiptail_you_sure); then
|
||||
true
|
||||
else
|
||||
echo "User cancelled setup." >> $setup_log 2>&1
|
||||
echo "User cancelled setup." | tee $setup_log
|
||||
whiptail_cancel
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user