mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
further improvements
This commit is contained in:
@@ -2380,3 +2380,11 @@ wait_for_file() {
|
||||
wait_for_salt_minion() {
|
||||
retry 60 5 "journalctl -u salt-minion.service | grep 'Minion is ready to receive requests'" >> "$setup_log" 2>&1 || exit 1
|
||||
}
|
||||
|
||||
verify_setup() {
|
||||
if logCmd ./so-verify "$setup_type"; then
|
||||
whiptail_setup_complete
|
||||
else
|
||||
whiptail_setup_failed
|
||||
fi
|
||||
}
|
||||
@@ -585,7 +585,7 @@ if ! [[ -f $install_opt_file ]]; then
|
||||
fi
|
||||
checkin_at_boot
|
||||
set_initial_firewall_access
|
||||
logCmd ./so-verify $setup_type
|
||||
verify_setup
|
||||
else
|
||||
touch /root/accept_changes
|
||||
mkdir -p /opt/so
|
||||
@@ -608,10 +608,8 @@ if ! [[ -f $install_opt_file ]]; then
|
||||
configure_minion "$minion_type"
|
||||
drop_install_options
|
||||
checkin_at_boot
|
||||
logCmd ./so-verify $setup_type
|
||||
verify_setup
|
||||
fi
|
||||
|
||||
# Need to make sure the latest install is located on the web server of the manager to check the versions and donwload the code if required
|
||||
|
||||
|
||||
fi
|
||||
|
||||
@@ -9,15 +9,10 @@ cd "$(dirname "$0")" || exit 255
|
||||
|
||||
source ../salt/common/tools/sbin/so-common
|
||||
source ./so-functions
|
||||
source ./so-whiptail
|
||||
source ./so-variables
|
||||
|
||||
setup_type=$1
|
||||
|
||||
setup_in_progress() {
|
||||
ps -ef | grep so-setup | grep -v grep &> /dev/null
|
||||
}
|
||||
|
||||
using_iso() {
|
||||
if [ "$setup_type" == "iso" ]; then
|
||||
return 0
|
||||
@@ -25,14 +20,6 @@ using_iso() {
|
||||
return 0
|
||||
}
|
||||
|
||||
whipit() {
|
||||
if [[ $exit_code -eq 0 ]]; then
|
||||
whiptail_setup_complete
|
||||
else
|
||||
whiptail_setup_failed
|
||||
fi
|
||||
}
|
||||
|
||||
# Check entire setup log for errors or unexpected salt states
|
||||
log_has_errors() {
|
||||
# Ignore salt mast cached public key and minion failed to auth because this is a test
|
||||
@@ -44,7 +31,7 @@ log_has_errors() {
|
||||
|
||||
# Ignore Failed: 0 since that is the salt state output, and we detect state failures
|
||||
# via Result: False already.
|
||||
|
||||
|
||||
grep -E "FAILED|Failed|failed|ERROR|Error|Result: False" "$setup_log" | \
|
||||
grep -vE "The Salt Master has cached the public key for this node" | \
|
||||
grep -vE "Minion failed to authenticate with the master" | \
|
||||
@@ -105,8 +92,6 @@ main() {
|
||||
echo "Successfully completed setup!"
|
||||
fi
|
||||
|
||||
setup_in_progress && whipit $exit_code
|
||||
|
||||
exit $exit_code
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user