mirror of
https://github.com/evilsocket/pwnagotchi.git
synced 2026-01-23 02:24:15 +00:00
delete logs after rotation
This commit deletes the logfile after compression. The current rotation keeps the logfiles which quickly fills up any zram compressed log mounts which will cause the pwnagotchi to hang. Signed-off-by: SK <74106733+skontrolle@users.noreply.github.com>
This commit is contained in:
parent
a5d5533acf
commit
880d9b9574
1 changed files with 2 additions and 0 deletions
|
|
@ -307,3 +307,5 @@ def do_rotate(filename, stats, cfg):
|
|||
with open(log_filename, 'rb') as src:
|
||||
with gzip.open(archive_filename, 'wb') as dst:
|
||||
dst.writelines(src)
|
||||
|
||||
os.remove(log_filename)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue