mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
Allow Firewall to update between versions
This commit is contained in:
@@ -705,9 +705,19 @@ fireeye_pillar() {
|
||||
|
||||
}
|
||||
|
||||
# Run a salt command to generate the minion key
|
||||
salt_firstcheckin() {
|
||||
salt-call state.show_top >> /dev/null # send output to /dev/null because we don't actually care about the ouput
|
||||
# Generate Firewall Templates
|
||||
firewall_generate_templates() {
|
||||
|
||||
local firewall_pillar_path=/opt/so/saltstack/salt/firewall
|
||||
mkdir -p "$firewall_pillar_path"
|
||||
|
||||
for i in analyst beats_endpoint forward_nodes masterfw minions osquery_endpoints search_nodes wazuh_endpoint
|
||||
do
|
||||
printf '%s\n'\
|
||||
"$i:"\
|
||||
" - 127.0.0.1"\
|
||||
"" > "$firewall_pillar_path"
|
||||
done
|
||||
}
|
||||
|
||||
fleet_pillar() {
|
||||
@@ -734,10 +744,6 @@ generate_passwords(){
|
||||
KRATOSKEY=$(tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w 20 | head -n 1)
|
||||
}
|
||||
|
||||
set_main_ip() {
|
||||
MAINIP=$(ip route get 1 | awk '{print $7;exit}')
|
||||
}
|
||||
|
||||
get_redirect() {
|
||||
whiptail_set_redirect_info
|
||||
whiptail_set_redirect
|
||||
@@ -755,15 +761,6 @@ got_root() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_cleanup() {
|
||||
echo "Installer removing the following files:"
|
||||
ls -lR "$temp_install_dir"
|
||||
|
||||
# Clean up after ourselves
|
||||
rm -rf "$temp_install_dir"
|
||||
|
||||
}
|
||||
|
||||
get_minion_type() {
|
||||
local minion_type
|
||||
case "$install_type" in
|
||||
@@ -780,9 +777,13 @@ get_minion_type() {
|
||||
echo "$minion_type"
|
||||
}
|
||||
|
||||
set_base_heapsizes() {
|
||||
es_heapsize
|
||||
ls_heapsize
|
||||
install_cleanup() {
|
||||
echo "Installer removing the following files:"
|
||||
ls -lR "$temp_install_dir"
|
||||
|
||||
# Clean up after ourselves
|
||||
rm -rf "$temp_install_dir"
|
||||
|
||||
}
|
||||
|
||||
master_pillar() {
|
||||
@@ -1173,6 +1174,20 @@ salt_checkin() {
|
||||
} >> "$setup_log" 2>&1
|
||||
}
|
||||
|
||||
# Run a salt command to generate the minion key
|
||||
salt_firstcheckin() {
|
||||
salt-call state.show_top >> /dev/null # send output to /dev/null because we don't actually care about the ouput
|
||||
}
|
||||
|
||||
set_base_heapsizes() {
|
||||
es_heapsize
|
||||
ls_heapsize
|
||||
}
|
||||
|
||||
set_main_ip() {
|
||||
MAINIP=$(ip route get 1 | awk '{print $7;exit}')
|
||||
}
|
||||
|
||||
setup_salt_master_dirs() {
|
||||
# Create salt paster directories
|
||||
mkdir -p /opt/so/saltstack/salt
|
||||
|
||||
Reference in New Issue
Block a user