mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-13 04:32:48 +01:00
Merge branch 'dev' of https://github.com/Security-Onion-Solutions/securityonion-saltstack into dev
This commit is contained in:
@@ -1,6 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
{%- set MASTER = salt['pillar.get']('static:masterip', '') %}
|
{%- set MASTER = salt['pillar.get']('static:masterip', '') %}
|
||||||
|
{%- set FLEET = salt['pillar.get']('static:fleet_ip', '') %}
|
||||||
|
{%- set KRATOS = salt['pillar.get']('kratos:redirect', '') %}
|
||||||
|
|
||||||
|
|
||||||
KIBANA_VERSION="7.6.1"
|
KIBANA_VERSION="7.6.1"
|
||||||
MAX_WAIT=120
|
MAX_WAIT=120
|
||||||
|
|
||||||
@@ -18,11 +22,17 @@ done
|
|||||||
# Sleep additional JIC server is not ready
|
# Sleep additional JIC server is not ready
|
||||||
sleep 30s
|
sleep 30s
|
||||||
|
|
||||||
# Sub our IP for placeholders
|
# Copy template file
|
||||||
cp /opt/so/conf/kibana/saved_objects.ndjson.template /opt/so/conf/kibana/saved_objects.ndjson
|
cp /opt/so/conf/kibana/saved_objects.ndjson.template /opt/so/conf/kibana/saved_objects.ndjson
|
||||||
for i in FLEETPLACEHOLDER PCAPPLACEHOLDER SOCTOPUSPLACEHOLDER PLACEHOLDER; do
|
|
||||||
sed -i "s/$i/{{ MASTER }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
# SOCtopus and Master
|
||||||
done
|
sed -i "s/PLACEHOLDER/{{ MASTER }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
||||||
|
|
||||||
|
# Fleet IP
|
||||||
|
sed -i "s/FLEETPLACEHOLDER/{{ FLEET }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
||||||
|
|
||||||
|
# Kratos redirect
|
||||||
|
sed -i "s/PCAPPLACEHOLDER/{{ KRATOS }}/g" /opt/so/conf/kibana/saved_objects.ndjson
|
||||||
|
|
||||||
# Load saved objects
|
# Load saved objects
|
||||||
curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@/opt/so/conf/kibana/saved_objects.ndjson > /dev/null 2>&1
|
curl -X POST "localhost:5601/api/saved_objects/_import" -H "kbn-xsrf: true" --form file=@/opt/so/conf/kibana/saved_objects.ndjson > /dev/null 2>&1
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -830,6 +830,7 @@ if (whiptail_you_sure) ; then
|
|||||||
filter_unused_nics >> $SETUPLOG 2>&1
|
filter_unused_nics >> $SETUPLOG 2>&1
|
||||||
network_setup >> $SETUPLOG 2>&1
|
network_setup >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n98\nVerifying Setup... \nXXX"
|
echo -e "XXX\n98\nVerifying Setup... \nXXX"
|
||||||
|
salt-call state.highstate >> $SETUPLOG 2>&1
|
||||||
} |whiptail --title "Hybrid Hunter Install" --gauge "Please wait while installing" 6 60 0
|
} |whiptail --title "Hybrid Hunter Install" --gauge "Please wait while installing" 6 60 0
|
||||||
GOODSETUP=$(tail -10 $SETUPLOG | grep Failed | awk '{ print $2}')
|
GOODSETUP=$(tail -10 $SETUPLOG | grep Failed | awk '{ print $2}')
|
||||||
if [[ $GOODSETUP == '0' ]]; then
|
if [[ $GOODSETUP == '0' ]]; then
|
||||||
@@ -948,6 +949,7 @@ if (whiptail_you_sure) ; then
|
|||||||
filter_unused_nics >> $SETUPLOG 2>&1
|
filter_unused_nics >> $SETUPLOG 2>&1
|
||||||
network_setup >> $SETUPLOG 2>&1
|
network_setup >> $SETUPLOG 2>&1
|
||||||
echo -e "XXX\n98\nVerifying Setup... \nXXX"
|
echo -e "XXX\n98\nVerifying Setup... \nXXX"
|
||||||
|
salt-call state.highstate >> $SETUPLOG 2>&1
|
||||||
} |whiptail --title "Hybrid Hunter Install" --gauge "Please wait while installing" 6 60 0
|
} |whiptail --title "Hybrid Hunter Install" --gauge "Please wait while installing" 6 60 0
|
||||||
GOODSETUP=$(tail -10 $SETUPLOG | grep Failed | awk '{ print $2}')
|
GOODSETUP=$(tail -10 $SETUPLOG | grep Failed | awk '{ print $2}')
|
||||||
if [[ $GOODSETUP == '0' ]]; then
|
if [[ $GOODSETUP == '0' ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user