mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
Add more logging to setup process
This commit is contained in:
@@ -1868,7 +1868,7 @@ securityonion_repo() {
|
|||||||
# if the package is updated when the update_packages function is called
|
# if the package is updated when the update_packages function is called
|
||||||
logCmd "yum -v -y update centos-release"
|
logCmd "yum -v -y update centos-release"
|
||||||
info "Backing up the .repo files that were added by the centos-release package."
|
info "Backing up the .repo files that were added by the centos-release package."
|
||||||
logCmd "find /etc/yum.repos.d/ -type f -not -name 'securityonion*repo' -print0 | xargs -0 -I {} mv -bvf {} /root/oldrepos/"
|
logCmd "find /etc/yum.repos.d/ -type f -not -name 'securityonion*repo' -exec mv -bvf {} /root/oldrepos/ \;"
|
||||||
logCmd "yum repolist all"
|
logCmd "yum repolist all"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -534,40 +534,39 @@ if ! [[ -f $install_opt_file ]]; then
|
|||||||
copy_salt_master_config
|
copy_salt_master_config
|
||||||
configure_minion "$minion_type"
|
configure_minion "$minion_type"
|
||||||
|
|
||||||
salt-key -yd "$MINION_ID" #delete the minion key if it already exists
|
logCmd "salt-key -yd '$MINION_ID'"
|
||||||
salt-call state.show_top >> /dev/null 2>&1 #talk to the salt-master so the minion key is created on the salt-master
|
logCmd "salt-call state.show_top"
|
||||||
salt-key -ya "$MINION_ID" #accept the key
|
logCmd "salt-key -ya '$MINION_ID'"
|
||||||
|
|
||||||
salt-call state.apply salt.helper-packages
|
logCmd "salt-call state.apply salt.helper-packages"
|
||||||
salt-call state.apply common.packages
|
logCmd "salt-call state.apply common.packages"
|
||||||
salt-call state.apply common
|
logCmd "salt-call state.apply common"
|
||||||
salt-call state.apply docker
|
logCmd "salt-call state.apply docker"
|
||||||
# Set the initial firewall policy
|
firewall_generate_templates
|
||||||
firewall_generate_templates;
|
|
||||||
set_initial_firewall_policy
|
set_initial_firewall_policy
|
||||||
|
|
||||||
generate_ca
|
generate_ca
|
||||||
generate_ssl
|
generate_ssl
|
||||||
|
|
||||||
# create these so the registry state can add so-registry to /opt/so/conf/so-status/so-status.conf
|
# create these so the registry state can add so-registry to /opt/so/conf/so-status/so-status.conf
|
||||||
mkdir -p /opt/so/conf/so-status/
|
logCmd "mkdir -p /opt/so/conf/so-status/ "
|
||||||
touch /opt/so/conf/so-status/so-status.conf
|
logCmd "touch /opt/so/conf/so-status/so-status.conf"
|
||||||
title "Importing Registry Docker"
|
title "Importing Registry Docker"
|
||||||
import_registry_docker
|
import_registry_docker
|
||||||
title "Applying the registry state"
|
title "Applying the registry state"
|
||||||
salt-call state.apply -l info registry
|
logCmd "salt-call state.apply -l info registry"
|
||||||
title "Seeding the docker registry"
|
title "Seeding the docker registry"
|
||||||
docker_seed_registry
|
docker_seed_registry
|
||||||
title "Applying the manager state"
|
title "Applying the manager state"
|
||||||
salt-call state.apply -l info manager
|
logCmd "salt-call state.apply -l info manager"
|
||||||
salt-call state.apply -l info firewall
|
logCmd "salt-call state.apply -l info firewall"
|
||||||
salt-call state.highstate -l info
|
logCmd "salt-call state.highstate -l info"
|
||||||
add_web_user
|
add_web_user
|
||||||
info "Restarting SOC to pick up initial user"
|
info "Restarting SOC to pick up initial user"
|
||||||
so-soc-restart
|
logCmd "so-soc-restart"
|
||||||
so-elastic-fleet-setup
|
logCmd "so-elastic-fleet-setup"
|
||||||
title "Setting up Playbook"
|
title "Setting up Playbook"
|
||||||
so-playbook-reset
|
logCmd "so-playbook-reset"
|
||||||
checkin_at_boot
|
checkin_at_boot
|
||||||
whiptail_setup_complete
|
whiptail_setup_complete
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1224,7 +1224,7 @@ whiptail_setup_complete() {
|
|||||||
if [[ -n $ALLOW_CIDR ]]; then
|
if [[ -n $ALLOW_CIDR ]]; then
|
||||||
local sentence_prefix="Access"
|
local sentence_prefix="Access"
|
||||||
else
|
else
|
||||||
local sentence_prefix="Run so-allow after reboot to access"
|
local sentence_prefix="Run so-allow to access"
|
||||||
fi
|
fi
|
||||||
local accessMessage="\n${sentence_prefix} the web interface at: https://${REDIRECTIT}\n"
|
local accessMessage="\n${sentence_prefix} the web interface at: https://${REDIRECTIT}\n"
|
||||||
elif [[ $is_idh ]]; then
|
elif [[ $is_idh ]]; then
|
||||||
@@ -1237,7 +1237,7 @@ whiptail_setup_complete() {
|
|||||||
read -r -d '' message <<- EOM
|
read -r -d '' message <<- EOM
|
||||||
Finished ${install_type} installation.
|
Finished ${install_type} installation.
|
||||||
$accessMessage
|
$accessMessage
|
||||||
Press ENTER to reboot.
|
Press ENTER to exit setup.
|
||||||
EOM
|
EOM
|
||||||
|
|
||||||
whiptail --title "$whiptail_title" --msgbox "$message" 12 75
|
whiptail --title "$whiptail_title" --msgbox "$message" 12 75
|
||||||
|
|||||||
Reference in New Issue
Block a user