compress and rotate logs if persistence enabled

if persistence is enabled, log files, downloads, binaries, etc. will be compressed and rotated
each start / stop of the t-pot service will account for a full rotation cycle if files are not empty
basically the rotation will recycle logs after 30 days, unless the service is stopped / started manually which will cause for a shorter period
This commit is contained in:
Marco Ochse
2017-07-20 20:25:49 +00:00
parent 0dedd4a172
commit 07c3f48894
3 changed files with 134 additions and 22 deletions

View File

@ -10,7 +10,7 @@ RestartSec=5
# Get and set internal, external IP infos, but ignore errors
ExecStartPre=-/usr/share/tpot/bin/updateip.sh
# Clear state from /data
# Clear state or if persistence is enabled rotate and compress logs from /data
ExecStartPre=-/bin/bash -c '/usr/share/tpot/bin/clean.sh off'
# Remove old containers, images and volumes