mirror of
https://github.com/telekom-security/tpotce.git
synced 2025-07-02 04:52:11 +00:00
tweaking
Update backup_es_folders to fit latest 17.x design Include updated elkbase Include updated kibana-objects
This commit is contained in:
parent
9e2313d7ca
commit
adc8ddd090
3 changed files with 6 additions and 33 deletions
|
@ -22,42 +22,15 @@ myKIBANAINDEXPATH=$myELKPATH/nodes/0/indices/$myKIBANAINDEXNAME
|
||||||
# Let's ensure normal operation on exit or if interrupted ...
|
# Let's ensure normal operation on exit or if interrupted ...
|
||||||
function fuCLEANUP {
|
function fuCLEANUP {
|
||||||
### Start ELK
|
### Start ELK
|
||||||
systemctl start elk
|
systemctl start tpot
|
||||||
echo "### Now starting up ELK ..."
|
echo "### Now starting T-Pot ..."
|
||||||
### Allow checks to resume
|
|
||||||
rm -rf /var/run/check.lock
|
|
||||||
}
|
}
|
||||||
trap fuCLEANUP EXIT
|
trap fuCLEANUP EXIT
|
||||||
|
|
||||||
# Make sure not to interrupt a check
|
# Stop T-Pot to lift db lock
|
||||||
while true
|
echo "### Now stopping T-Pot"
|
||||||
do
|
systemctl stop tpot
|
||||||
if ! [ -a /var/run/check.lock ];
|
sleep 2
|
||||||
then break
|
|
||||||
fi
|
|
||||||
sleep 0.1
|
|
||||||
if [ "$myCOUNT" = "1" ];
|
|
||||||
then
|
|
||||||
echo -n "### Waiting for services "
|
|
||||||
else echo -n .
|
|
||||||
fi
|
|
||||||
if [ "$myCOUNT" = "6000" ];
|
|
||||||
then
|
|
||||||
echo
|
|
||||||
echo "### Overriding check.lock"
|
|
||||||
rm /var/run/check.lock
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
myCOUNT=$[$myCOUNT +1]
|
|
||||||
done
|
|
||||||
|
|
||||||
# We do not want to get interrupted by a check
|
|
||||||
touch /var/run/check.lock
|
|
||||||
|
|
||||||
# Stop ELK to lift db lock
|
|
||||||
echo "### Now stopping ELK ..."
|
|
||||||
systemctl stop elk
|
|
||||||
sleep 10
|
|
||||||
|
|
||||||
# Backup DB in 2 flavors
|
# Backup DB in 2 flavors
|
||||||
echo "### Now backing up Elasticsearch folders ..."
|
echo "### Now backing up Elasticsearch folders ..."
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue