From ac73200e4f0cf4020dfcd0a11e6004bca479253f Mon Sep 17 00:00:00 2001 From: zsdc Date: Tue, 7 Dec 2021 22:41:27 +0200 Subject: logs: T3774: Added CLI options to control atop logs rotation Added CLI options to generate logrotate configuration file for atop logs --- data/templates/logs/logrotate/vyos-atop.tmpl | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 data/templates/logs/logrotate/vyos-atop.tmpl (limited to 'data/templates/logs') diff --git a/data/templates/logs/logrotate/vyos-atop.tmpl b/data/templates/logs/logrotate/vyos-atop.tmpl new file mode 100644 index 000000000..797bf237f --- /dev/null +++ b/data/templates/logs/logrotate/vyos-atop.tmpl @@ -0,0 +1,20 @@ +/var/log/atop/atop.log { + daily + dateext + dateformat _%Y-%m-%d_%H-%M-%S + maxsize {{ maxsize|default('10') }}M + missingok + nocompress + nocreate + nomail + rotate {{ rotate|default('10') }} + prerotate + # stop the service + systemctl stop atop.service + endscript + postrotate + # start atop service again + systemctl start atop.service + endscript +} + -- cgit v1.2.3