logrotate

This commit is contained in:
Mateusz Gruszczyński
2025-10-27 09:44:54 +01:00
parent 0a4f4bf1d4
commit e73027a3c8
2 changed files with 17 additions and 0 deletions

View File

@@ -2,6 +2,7 @@
"""
CertPusher - Automated SSL Certificate Distribution Tool
Version 1.2 - Production Ready with MikroTik Services Support
Author: @linuxiarz.pl, Mateusz Gruszczyńśki
"""
import configparser

16
logrotate_certpusher Normal file
View File

@@ -0,0 +1,16 @@
/opt/certpusher/logs/*.log {
daily
rotate 7
compress
delaycompress
missingok
notifempty
create 0644 root root
dateext
dateformat -%Y%m%d
extension .log
nomail
postrotate
find /opt/certpusher/logs -name "*.log*" -type f -mtime +3 -delete
endscript
}