summaryrefslogtreecommitdiff
path: root/data/templates/logs/logrotate/vyos-atop.j2
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2022-05-01 20:43:45 +0200
committerChristian Poessinger <christian@poessinger.com>2022-05-01 20:47:04 +0200
commitf38ce741c2852e4eaeeaa23736960d9a717b600f (patch)
treecec4d823a93611c3df0f073c341ea0a18754dc33 /data/templates/logs/logrotate/vyos-atop.j2
parent01bdf2dfdb09bf9dd7ca4e7b49def302b2cd7c29 (diff)
downloadvyos-1x-f38ce741c2852e4eaeeaa23736960d9a717b600f.tar.gz
vyos-1x-f38ce741c2852e4eaeeaa23736960d9a717b600f.zip
system-logs: T4353: fix Jinja2 linting errors
Diffstat (limited to 'data/templates/logs/logrotate/vyos-atop.j2')
-rw-r--r--data/templates/logs/logrotate/vyos-atop.j220
1 files changed, 20 insertions, 0 deletions
diff --git a/data/templates/logs/logrotate/vyos-atop.j2 b/data/templates/logs/logrotate/vyos-atop.j2
new file mode 100644
index 000000000..2d078f379
--- /dev/null
+++ b/data/templates/logs/logrotate/vyos-atop.j2
@@ -0,0 +1,20 @@
+/var/log/atop/atop.log {
+ daily
+ dateext
+ dateformat _%Y-%m-%d_%H-%M-%S
+ maxsize {{ max_size }}M
+ missingok
+ nocompress
+ nocreate
+ nomail
+ rotate {{ rotate }}
+ prerotate
+ # stop the service
+ systemctl stop atop.service
+ endscript
+ postrotate
+ # start atop service again
+ systemctl start atop.service
+ endscript
+}
+