summaryrefslogtreecommitdiff
path: root/data/templates/syslog/logrotate.tmpl
diff options
context:
space:
mode:
authorChristian Poessinger <christian@poessinger.com>2020-04-05 20:28:42 +0200
committerChristian Poessinger <christian@poessinger.com>2020-04-05 20:28:42 +0200
commit108979391c5811963a6fb3e20b8baec446814b05 (patch)
tree8250a0189bd1feb5473237eaf775a0263058342b /data/templates/syslog/logrotate.tmpl
parent912ffbfc78c336bf783c022cd53e8a653863b178 (diff)
downloadvyos-1x-108979391c5811963a6fb3e20b8baec446814b05.tar.gz
vyos-1x-108979391c5811963a6fb3e20b8baec446814b05.zip
syslog: T2230: move inlined templates to dedicated files
Diffstat (limited to 'data/templates/syslog/logrotate.tmpl')
-rw-r--r--data/templates/syslog/logrotate.tmpl12
1 files changed, 12 insertions, 0 deletions
diff --git a/data/templates/syslog/logrotate.tmpl b/data/templates/syslog/logrotate.tmpl
new file mode 100644
index 000000000..f758265e4
--- /dev/null
+++ b/data/templates/syslog/logrotate.tmpl
@@ -0,0 +1,12 @@
+{% for file in files %}
+{{files[file]['log-file']}} {
+ missingok
+ notifempty
+ create
+ rotate {{files[file]['max-files']}}
+ size={{files[file]['max-size']//1024}}k
+ postrotate
+ invoke-rc.d rsyslog rotate > /dev/null
+ endscript
+}
+{% endfor %}