ensl_hlds/scripts/rotate_demos.sh
Ari Timonen 5d59382be8 Update for docker-compose
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
2018-05-07 04:19:10 +00:00

16 lines
323 B
Bash
Executable file

#!/bin/bash
rotateFiles() {
file="$0".zip
if test -f "$file";
then rm "$0" && echo "Removed: $0"
else
zip -9 --quiet -r "$0.zip" "$0" && rm "$0" && echo "Rotated: $0"
fi
}
while true; do
export -f rotateFiles
find . -maxdepth 1 -iname '*.dem' -mmin +30 -exec bash -c 'rotateFiles "$0"' {} \;
sleep 300
done