diff options
author | zsdc <taras@vyos.io> | 2022-03-07 18:20:53 +0200 |
---|---|---|
committer | zsdc <taras@vyos.io> | 2022-03-07 18:20:53 +0200 |
commit | ebb524702e1cd60a74b00727b7bd24d375648c78 (patch) | |
tree | 7316b9e1c2434d8e18ce798a644e393078008fe8 /data | |
parent | 1d0d4e83d8413c1b389be763cadd5d150d4be982 (diff) | |
download | vyos-1x-ebb524702e1cd60a74b00727b7bd24d375648c78.tar.gz vyos-1x-ebb524702e1cd60a74b00727b7bd24d375648c78.zip |
logrotate: T4250: Fixed logrotate config generation
* Removed `/var/log/auth.log` and `/var/log/messages` from
`/etc/logrotate.d/rsyslog`, because they conflict with VyOS-controlled
items what leads to service error.
* Removed generation config file for `/var/log/messages` from
`system-syslog.py` - this should be done from `syslom logs` now.
* Generate each logfile from `system syslog file` to a dedicated
logrotate config file.
* Fixed logrotate config file names in
`/etc/rsyslog.d/vyos-rsyslog.conf`.
* Added default logrotate settins for `/var/log/messages`
Diffstat (limited to 'data')
-rw-r--r-- | data/templates/syslog/logrotate.tmpl | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/data/templates/syslog/logrotate.tmpl b/data/templates/syslog/logrotate.tmpl index f758265e4..c1b951e8b 100644 --- a/data/templates/syslog/logrotate.tmpl +++ b/data/templates/syslog/logrotate.tmpl @@ -1,12 +1,11 @@ -{% for file in files %} -{{files[file]['log-file']}} { +{{ config_render['log-file'] }} { missingok notifempty create - rotate {{files[file]['max-files']}} - size={{files[file]['max-size']//1024}}k + rotate {{ config_render['max-files'] }} + size={{ config_render['max-size'] // 1024 }}k postrotate invoke-rc.d rsyslog rotate > /dev/null endscript } -{% endfor %} + |