mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 18:22:47 +01:00
Use explicit path to so-elasticsearch-query
This commit is contained in:
@@ -13,7 +13,7 @@ TOTAL_AVAILABLE_SPACE=0
|
|||||||
COUNT=0
|
COUNT=0
|
||||||
ELASTICSEARCH_CONNECTED="no"
|
ELASTICSEARCH_CONNECTED="no"
|
||||||
while [[ "$COUNT" -le 240 ]]; do
|
while [[ "$COUNT" -le 240 ]]; do
|
||||||
so-elasticsearch-query / -k --output /dev/null --silent --head --fail
|
/usr/sbin/so-elasticsearch-query / -k --output /dev/null --silent --head --fail
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
ELASTICSEARCH_CONNECTED="yes"
|
ELASTICSEARCH_CONNECTED="yes"
|
||||||
break
|
break
|
||||||
@@ -37,7 +37,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Iterate through the output of _cat/allocation for each node in the cluster to determine the total available space
|
# Iterate through the output of _cat/allocation for each node in the cluster to determine the total available space
|
||||||
for i in $(so-elasticsearch-query _cat/allocation | awk '{print $5}'); do
|
for i in $(/usr/sbin/so-elasticsearch-query _cat/allocation | awk '{print $5}'); do
|
||||||
size=$(echo $i | grep -oE '[0-9]+')
|
size=$(echo $i | grep -oE '[0-9]+')
|
||||||
unit=$(echo $i | grep -oE '[A-Za-z]+')
|
unit=$(echo $i | grep -oE '[A-Za-z]+')
|
||||||
if [ $unit = "tb" ]; then
|
if [ $unit = "tb" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user