mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-09 10:42:54 +01:00
Clean up static.sls passwords
This commit is contained in:
@@ -9,6 +9,12 @@
|
|||||||
|
|
||||||
default_salt_dir=/opt/so/saltstack/default
|
default_salt_dir=/opt/so/saltstack/default
|
||||||
|
|
||||||
|
cortex_clean(){
|
||||||
|
sed -i '/^ cortexuser:/d' /opt/so/saltstack/local/pillar/static.sls
|
||||||
|
sed -i '/^ cortexpassword:/d' /opt/so/saltstack/local/pillar/static.sls
|
||||||
|
sed -i '/^ cortexorguser:/d' /opt/so/saltstack/local/pillar/static.sls
|
||||||
|
}
|
||||||
|
|
||||||
cortex_init(){
|
cortex_init(){
|
||||||
sleep 60
|
sleep 60
|
||||||
CORTEX_IP="{{MANAGERIP}}"
|
CORTEX_IP="{{MANAGERIP}}"
|
||||||
@@ -51,6 +57,7 @@ cortex_init(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -f /opt/so/state/cortex.txt ]; then
|
if [ -f /opt/so/state/cortex.txt ]; then
|
||||||
|
cortex_clean
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
rm -f garbage_file
|
rm -f garbage_file
|
||||||
@@ -63,4 +70,5 @@ else
|
|||||||
rm -f garbage_file
|
rm -f garbage_file
|
||||||
sleep 5
|
sleep 5
|
||||||
cortex_init
|
cortex_init
|
||||||
|
cortex_clean
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -4,6 +4,11 @@
|
|||||||
# {%- set THEHIVEPASSWORD = salt['pillar.get']('static:hivepassword', 'hivechangeme') %}
|
# {%- set THEHIVEPASSWORD = salt['pillar.get']('static:hivepassword', 'hivechangeme') %}
|
||||||
# {%- set THEHIVEKEY = salt['pillar.get']('static:hivekey', '') %}
|
# {%- set THEHIVEKEY = salt['pillar.get']('static:hivekey', '') %}
|
||||||
|
|
||||||
|
thehive_clean(){
|
||||||
|
sed -i '/^ hiveuser:/d' /opt/so/saltstack/local/pillar/static.sls
|
||||||
|
sed -i '/^ hivepassword:/d' /opt/so/saltstack/local/pillar/static.sls
|
||||||
|
}
|
||||||
|
|
||||||
thehive_init(){
|
thehive_init(){
|
||||||
sleep 120
|
sleep 120
|
||||||
THEHIVE_IP="{{MANAGERIP}}"
|
THEHIVE_IP="{{MANAGERIP}}"
|
||||||
@@ -49,6 +54,7 @@ thehive_init(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
if [ -f /opt/so/state/thehive.txt ]; then
|
if [ -f /opt/so/state/thehive.txt ]; then
|
||||||
|
thehive_clean
|
||||||
exit 0
|
exit 0
|
||||||
else
|
else
|
||||||
rm -f garbage_file
|
rm -f garbage_file
|
||||||
@@ -61,4 +67,5 @@ else
|
|||||||
rm -f garbage_file
|
rm -f garbage_file
|
||||||
sleep 5
|
sleep 5
|
||||||
thehive_init
|
thehive_init
|
||||||
|
thehive_clean
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user