mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[feat] Fail setup early if "ERROR" is found in setup log
This commit is contained in:
@@ -1241,8 +1241,9 @@ salt_checkin() {
|
|||||||
cat /etc/pki/ca.crt
|
cat /etc/pki/ca.crt
|
||||||
echo " Applyng a mine hack";
|
echo " Applyng a mine hack";
|
||||||
salt '*' mine.send x509.get_pem_entries glob_path=/etc/pki/ca.crt;
|
salt '*' mine.send x509.get_pem_entries glob_path=/etc/pki/ca.crt;
|
||||||
echo " Confirming salt mine now contain the certificate"
|
salt '*' mine.update;
|
||||||
salt \* mine.get \* x509.get_pem_entries
|
echo " Confirming salt mine now contain the certificate";
|
||||||
|
salt '*' mine.get '*' x509.get_pem_entries;
|
||||||
echo " Applying SSL state";
|
echo " Applying SSL state";
|
||||||
salt-call state.apply ssl;
|
salt-call state.apply ssl;
|
||||||
} >> "$setup_log" 2>&1
|
} >> "$setup_log" 2>&1
|
||||||
|
|||||||
@@ -52,10 +52,14 @@ echo "---- Starting setup at $(date -u) ----" >> $setup_log 2>&1
|
|||||||
automated=no
|
automated=no
|
||||||
function progress() {
|
function progress() {
|
||||||
if [ $automated == no ]; then
|
if [ $automated == no ]; then
|
||||||
|
if grep -q "ERROR" $setup_log || [[ -s /var/spool/mail/root ]]; then
|
||||||
|
whiptail_setup_failed
|
||||||
|
fi
|
||||||
whiptail --title "Security Onion Install" --gauge 'Please wait while installing' 6 60 0
|
whiptail --title "Security Onion Install" --gauge 'Please wait while installing' 6 60 0
|
||||||
else
|
else
|
||||||
cat >> $setup_log 2>&1
|
cat >> $setup_log 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [[ -f automation/$automation && $(basename $automation) == $automation ]]; then
|
if [[ -f automation/$automation && $(basename $automation) == $automation ]]; then
|
||||||
@@ -389,7 +393,6 @@ fi
|
|||||||
set_progress_str 9 'Initializing Salt minion'
|
set_progress_str 9 'Initializing Salt minion'
|
||||||
configure_minion "$minion_type" >> $setup_log 2>&1
|
configure_minion "$minion_type" >> $setup_log 2>&1
|
||||||
|
|
||||||
|
|
||||||
if [[ $is_master || $is_helix ]]; then
|
if [[ $is_master || $is_helix ]]; then
|
||||||
set_progress_str 10 'Configuring Salt master'
|
set_progress_str 10 'Configuring Salt master'
|
||||||
create_local_directories >> $setup_log 2>&1
|
create_local_directories >> $setup_log 2>&1
|
||||||
|
|||||||
Reference in New Issue
Block a user