summaryrefslogtreecommitdiff
path: root/data/templates/logs/logrotate/vyos-rsyslog.tmpl
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2021-12-13 20:05:25 +0200
committerzsdc <taras@vyos.io>2021-12-13 21:45:47 +0200
commit945ab070b72ebd9f5ccfe0052ed138a93b83b297 (patch)
tree9e3c40eba1190f9e8edff9fb9c1219b18cc91fc0 /data/templates/logs/logrotate/vyos-rsyslog.tmpl
parenta22ba14999a38217155a7a999f61e855d813cc41 (diff)
downloadvyos-1x-945ab070b72ebd9f5ccfe0052ed138a93b83b297.tar.gz
vyos-1x-945ab070b72ebd9f5ccfe0052ed138a93b83b297.zip
logs: T3774: Added new CLI item
Added the ability to control the `/var/log/messages` rotation. Renamed the option `maxsize` to `max-size`.
Diffstat (limited to 'data/templates/logs/logrotate/vyos-rsyslog.tmpl')
-rw-r--r--data/templates/logs/logrotate/vyos-rsyslog.tmpl13
1 files changed, 13 insertions, 0 deletions
diff --git a/data/templates/logs/logrotate/vyos-rsyslog.tmpl b/data/templates/logs/logrotate/vyos-rsyslog.tmpl
new file mode 100644
index 000000000..3af1bfd8e
--- /dev/null
+++ b/data/templates/logs/logrotate/vyos-rsyslog.tmpl
@@ -0,0 +1,13 @@
+/var/log/messages {
+ create
+ missingok
+ nomail
+ notifempty
+ rotate {{ rotate|default('10') }}
+ size {{ max_size|default('1') }}M
+ postrotate
+ # restart rsyslog service
+ systemctl restart rsyslog.service
+ endscript
+}
+