summaryrefslogtreecommitdiff
path: root/src/etc/logrotate.d/vyos-atop
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2021-11-10 06:01:33 +0100
committerGitHub <noreply@github.com>2021-11-10 06:01:33 +0100
commitdeea1c6a2070276c0cd2f78bf0346c993773a900 (patch)
tree5ccb2bdb5f0de02748329992340fdb517681de9f /src/etc/logrotate.d/vyos-atop
parent552ab74b49a44b6cd830fbdc13d40d1633f3c6cf (diff)
parent14e3b26ff5ffce9ae19050645b0efc6c4725880a (diff)
downloadvyos-1x-deea1c6a2070276c0cd2f78bf0346c993773a900.tar.gz
vyos-1x-deea1c6a2070276c0cd2f78bf0346c993773a900.zip
Merge pull request #1068 from zdc/T3774-sagitta
atop: T3774: Atop log file rotation fix
Diffstat (limited to 'src/etc/logrotate.d/vyos-atop')
-rw-r--r--src/etc/logrotate.d/vyos-atop20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/etc/logrotate.d/vyos-atop b/src/etc/logrotate.d/vyos-atop
new file mode 100644
index 000000000..0c8359c7b
--- /dev/null
+++ b/src/etc/logrotate.d/vyos-atop
@@ -0,0 +1,20 @@
+/var/log/atop/atop.log {
+ daily
+ dateext
+ dateformat _%Y-%m-%d_%H-%M-%S
+ maxsize 10M
+ missingok
+ nocompress
+ nocreate
+ nomail
+ rotate 10
+ prerotate
+ # stop the service
+ systemctl stop atop.service
+ endscript
+ postrotate
+ # start atop service again
+ systemctl start atop.service
+ endscript
+}
+