mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-21 16:33:08 +01:00
[fix] reboot error fix
This commit is contained in:
@@ -91,13 +91,13 @@ wait_for_file() {
|
||||
local date
|
||||
date=$(date)
|
||||
|
||||
while [[ $cur_attempts < $max_attempts ]]; do
|
||||
while [[ $cur_attempts -lt $max_attempts ]]; do
|
||||
if [ -f "$filename" ]; then
|
||||
echo "File $filename already exists at $date" >> "$setup_log" 2>&1
|
||||
echo "File $filename found at $date" >> "$setup_log" 2>&1
|
||||
return 0
|
||||
else
|
||||
echo "File $filename does not exist; waiting ${wait_interval}s then checking again ($cur_attempts/$max_attempts)..." >> "$setup_log" 2>&1
|
||||
((cur_attempts++))
|
||||
echo "File $filename does not exist; waiting ${wait_interval}s then checking again ($cur_attempts/$max_attempts)..." >> "$setup_log" 2>&1
|
||||
sleep "$wait_interval"
|
||||
fi
|
||||
done
|
||||
@@ -195,11 +195,10 @@ check_admin_pass() {
|
||||
|
||||
check_hive_init_then_reboot() {
|
||||
|
||||
local return_val
|
||||
return_val="$(wait_for_file /opt/so/state/thehive.txt 20 5)"
|
||||
|
||||
if [[ "$return_val" != 0 ]]; then
|
||||
return "$return_val"
|
||||
wait_for_file /opt/so/state/thehive.txt 20 5
|
||||
local return_val=$?
|
||||
if [[ $return_val -ne 0 ]]; then
|
||||
return $return_val
|
||||
fi
|
||||
|
||||
docker stop so-thehive
|
||||
|
||||
Reference in New Issue
Block a user