mirror of
https://github.com/ENSL/ensl_hlds.git
synced 2024-11-10 07:11:38 +00:00
5d59382be8
Add latest ENSL plugin. Add docker-compose file. Update dockerfile to support 3.2.1b. ADd entry script that works on all docker images. Add seperate log rotation scripts
16 lines
318 B
Bash
Executable file
16 lines
318 B
Bash
Executable file
#!/bin/bash
|
|
|
|
rotateFiles() {
|
|
file="$0".lz4
|
|
if test -f "$file";
|
|
then rm "$0" && echo "Removed: $0"
|
|
else
|
|
lz4 -9 -z -q "$0.lz4" "$0" && rm "$0" && echo "Rotated: $0"
|
|
fi
|
|
}
|
|
|
|
while true; do
|
|
export -f rotateFiles
|
|
find . -maxdepth 1 -iname '*.log' -mmin +30 -exec bash -c 'rotateFiles "$0"' {} \;
|
|
sleep 300
|
|
done
|