Commit 71f1338d authored by Jérome Perrin's avatar Jérome Perrin

stack/logrotate: fix copytruncate being accidentally always enabled

In 0409f691 (zope4: Handle log rotation following Zope documentation.,
2022-03-10) we added an option to use copytruncate in logrotate, with
a default value of "false" which is true in jinja2, so it was actually
enabled every where.

This change brings the expected behavior copytruncate option in
logrotate stack, it is not enabled by default, unless explicitly using
copytruncate = true
parent 4c384cb5
......@@ -22,4 +22,4 @@ md5sum = 02c1009f8e0dc371cfc1290afef72ec7
[template-logrotate-base]
filename = instance-logrotate-base.cfg.in
md5sum = 4e2baa1edd1d27831dda984769102a7c
md5sum = 303fad78d62d6e29c0c547a9f64fa822
......@@ -47,6 +47,8 @@ context =
# - "post" with commands to execute after rotation
# - "pre" with commands to execute before rotation
# - "backup" with directory where to store logs
# - "copytruncate" to use logrotate's copytruncate option, setting to ""
# (the default) disable copytruncate, setting to anything else enable copytruncate
recipe = slapos.recipe.template:jinja2
url = {{ logrotate_entry_template }}
output = ${logrotate-conf-parameter:logrotate-entries}/${:name}
......@@ -60,7 +62,7 @@ context =
key rotate_num :rotate-num
key nocompress :nocompress
key delaycompress :delaycompress
copytruncate = false
copytruncate =
post =
pre =
frequency = daily
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment