summaryrefslogtreecommitdiff
path: root/debian/vyos-1x.postinst
diff options
context:
space:
mode:
authorzsdc <taras@vyos.io>2022-03-07 18:20:53 +0200
committerzsdc <taras@vyos.io>2022-03-07 18:20:53 +0200
commitebb524702e1cd60a74b00727b7bd24d375648c78 (patch)
tree7316b9e1c2434d8e18ce798a644e393078008fe8 /debian/vyos-1x.postinst
parent1d0d4e83d8413c1b389be763cadd5d150d4be982 (diff)
downloadvyos-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 'debian/vyos-1x.postinst')
-rw-r--r--debian/vyos-1x.postinst4
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/vyos-1x.postinst b/debian/vyos-1x.postinst
index 1a4c830cc..1ca6687a3 100644
--- a/debian/vyos-1x.postinst
+++ b/debian/vyos-1x.postinst
@@ -93,3 +93,7 @@ for file in $DELETE; do
rm -f ${file}
fi
done
+
+# Remove logrotate items controlled via CLI and VyOS defaults
+sed -i '/^\/var\/log\/messages$/d' /etc/logrotate.d/rsyslog
+sed -i '/^\/var\/log\/auth.log$/d' /etc/logrotate.d/rsyslog