mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2026-07-11 11:31:28 +02:00
keep logs for all 3 attempts
This commit is contained in:
@@ -16,8 +16,6 @@ check_agent_health() {
|
||||
interval=10
|
||||
start=$SECONDS
|
||||
|
||||
truncate -s 0 "$LOGFILE"
|
||||
|
||||
while (( SECONDS - start < timeout )); do
|
||||
agent_status=$(elastic-agent status 2>&1)
|
||||
echo -e "\n$(date)\n$agent_status\n" >> "$LOGFILE"
|
||||
@@ -70,6 +68,8 @@ if [[ -x /opt/so/so-elastic-agent_linux_amd64 ]]; then
|
||||
attempts=0
|
||||
cd /opt/so/ || exit 1
|
||||
|
||||
truncate -s 0 "$LOGFILE"
|
||||
|
||||
uninstall_agent
|
||||
|
||||
while [[ $attempts -lt 3 ]]; do
|
||||
|
||||
Reference in New Issue
Block a user