From e73027a3c8d056df669463961f6b1de4e4d600cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Gruszczy=C5=84ski?= Date: Mon, 27 Oct 2025 09:44:54 +0100 Subject: [PATCH] logrotate --- certpusher.py | 1 + logrotate_certpusher | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 logrotate_certpusher diff --git a/certpusher.py b/certpusher.py index dcf2494..4d98f0e 100644 --- a/certpusher.py +++ b/certpusher.py @@ -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 diff --git a/logrotate_certpusher b/logrotate_certpusher new file mode 100644 index 0000000..06214ad --- /dev/null +++ b/logrotate_certpusher @@ -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 +}