mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-07-08 18:11:21 +02:00
uninstall agent after downloading new one and getting gridtoken
This commit is contained in:
@@ -33,8 +33,6 @@ uninstall_agent() {
|
||||
fi
|
||||
}
|
||||
|
||||
uninstall_agent
|
||||
|
||||
if [[ -z "$GRIDNODETOKEN" ]]; then
|
||||
noderole=$(so-yaml.py get -r /etc/salt/grains role)
|
||||
if [[ "$noderole" == "so-heavynode" ]]; then
|
||||
@@ -55,6 +53,8 @@ if [[ ! -x /opt/so/so-elastic-agent_linux_amd64 ]]; then
|
||||
salt-call state.sls_id pull_agent_installer elasticfleet.install_agent_grid queue=True
|
||||
fi
|
||||
|
||||
uninstall_agent
|
||||
|
||||
if [[ -x /opt/so/so-elastic-agent_linux_amd64 ]]; then
|
||||
attempts=0
|
||||
cd /opt/so/ || exit 1
|
||||
|
||||
Reference in New Issue
Block a user