mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
[fix] numeric argument required, return 0 in wait_for_file
This commit is contained in:
@@ -94,7 +94,7 @@ wait_for_file() {
|
|||||||
while [[ $cur_attempts < $max_attempts ]]; do
|
while [[ $cur_attempts < $max_attempts ]]; do
|
||||||
if [ -f "$filename" ]; then
|
if [ -f "$filename" ]; then
|
||||||
echo "File $filename already exists at $date" >> "$setup_log" 2>&1
|
echo "File $filename already exists at $date" >> "$setup_log" 2>&1
|
||||||
return
|
return 0
|
||||||
else
|
else
|
||||||
echo "File $filename does not exist; waiting ${wait_interval}s then checking again ($cur_attempts/$max_attempts)..." >> "$setup_log" 2>&1
|
echo "File $filename does not exist; waiting ${wait_interval}s then checking again ($cur_attempts/$max_attempts)..." >> "$setup_log" 2>&1
|
||||||
((cur_attempts++))
|
((cur_attempts++))
|
||||||
@@ -198,7 +198,7 @@ check_hive_init_then_reboot() {
|
|||||||
local return_val
|
local return_val
|
||||||
return_val="$(wait_for_file /opt/so/state/thehive.txt 20 5)"
|
return_val="$(wait_for_file /opt/so/state/thehive.txt 20 5)"
|
||||||
|
|
||||||
if [[ $return_val != 0 ]]; then
|
if [[ "$return_val" != 0 ]]; then
|
||||||
return "$return_val"
|
return "$return_val"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user