mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Reboot on early failure too, better if statements
This commit is contained in:
@@ -51,18 +51,17 @@ echo "---- Starting setup at $(date -u) ----" >> $setup_log 2>&1
|
||||
|
||||
automated=no
|
||||
function progress() {
|
||||
if [ $automated == no ]; then
|
||||
if grep -q "ERROR" $setup_log || [[ -s /var/spool/mail/root ]]; then
|
||||
whiptail_setup_failed
|
||||
fi
|
||||
if [[ $automated == no ]]; then whiptail_setup_failed; else exit 1; fi
|
||||
|
||||
if [[ -z $SKIP_REBOOT ]]; then shutdown -r now; fi
|
||||
else
|
||||
if [ $automated == no ]; then
|
||||
whiptail --title "Security Onion Install" --gauge 'Please wait while installing' 6 60 0
|
||||
else
|
||||
if grep -q "ERROR" $setup_log || [[ -s /var/spool/mail/root ]]; then
|
||||
exit 1
|
||||
fi
|
||||
cat >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ -f automation/$automation && $(basename $automation) == $automation ]]; then
|
||||
@@ -599,10 +598,12 @@ fi
|
||||
success=$(tail -10 $setup_log | grep Failed | awk '{ print $2}')
|
||||
if [[ "$success" = 0 ]]; then
|
||||
whiptail_setup_complete
|
||||
|
||||
if [[ -n $ALLOW_ROLE && -n $ALLOW_CIDR ]]; then
|
||||
export IP=$ALLOW_CIDR
|
||||
so-allow -$ALLOW_ROLE >> $setup_log 2>&1
|
||||
fi
|
||||
|
||||
if [[ $THEHIVE == 1 ]]; then
|
||||
check_hive_init
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user