This commit is contained in:
t3chn0m4g3 2023-05-03 22:01:36 +00:00
parent 35188ef28e
commit efd5f4c54c

View file

@ -57,9 +57,10 @@ if [ "$MY_TPOT_TYPE" == "SENSOR" ];
chmod 600 $MY_SENSOR_PRIVATEKEYFILE
cp /usr/share/logstash/config/pipelines_sensor.yml /usr/share/logstash/config/pipelines.yml
autossh -f -M 0 -4 -l $MY_HIVE_USERNAME -i $MY_SENSOR_PRIVATEKEYFILE -p 64295 -N -L64305:127.0.0.1:64305 $MY_HIVE_IP -o "ServerAliveInterval 30" -o "ServerAliveCountMax 3" -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null"
exit 0
fi
if [ "$MY_TPOT_TYPE" != "SENSOR" ];
then
# Index Management is happening through ILM, but we need to put T-Pot ILM setting on ES.
myTPOTILM=$(curl -s -XGET "http://elasticsearch:9200/_ilm/policy/tpot" | grep "Lifecycle policy not found: tpot" -c)
if [ "$myTPOTILM" == "1" ];
@ -91,6 +92,7 @@ if [ "$myTPOTILM" == "1" ];
else
echo "T-Pot ILM already configured or ES not available."
fi
fi
echo
exec /usr/share/logstash/bin/logstash --config.reload.automatic