From d008fc33552a486923f6410449e215c0e01e68d4 Mon Sep 17 00:00:00 2001 From: Gardais Jeremy Date: Fri, 4 Jan 2019 15:03:39 +0100 Subject: [PATCH] Set new logrotate conf for Buster Some configuration needs the new "v6+" directives to be applied. --- scripts/latecommand/buster/etc/logrotate.conf | 29 +++++ .../latecommand/buster/etc/logrotate.d/apt | 12 ++ .../buster/etc/logrotate.d/aptitude | 7 ++ .../latecommand/buster/etc/logrotate.d/dpkg | 16 +++ .../buster/etc/logrotate.d/rsyslog | 108 ++++++++++++++++++ 5 files changed, 172 insertions(+) create mode 100644 scripts/latecommand/buster/etc/logrotate.conf create mode 100644 scripts/latecommand/buster/etc/logrotate.d/apt create mode 100644 scripts/latecommand/buster/etc/logrotate.d/aptitude create mode 100644 scripts/latecommand/buster/etc/logrotate.d/dpkg create mode 100644 scripts/latecommand/buster/etc/logrotate.d/rsyslog diff --git a/scripts/latecommand/buster/etc/logrotate.conf b/scripts/latecommand/buster/etc/logrotate.conf new file mode 100644 index 0000000..61a7705 --- /dev/null +++ b/scripts/latecommand/buster/etc/logrotate.conf @@ -0,0 +1,29 @@ + +create +weekly +compress +delaycompress +dateext +notifempty +include /etc/logrotate.d +rotate 4 + +# No packages own wtmp or btmp, they will be managed directly +/var/log/wtmp { + missingok + monthly + create 0664 root utmp + rotate 3 + olddir /var/log/old_logs.d + minsize 1M +} + +# No packages own wtmp or btmp, they will be managed directly +/var/log/btmp { + missingok + monthly + create 0660 root utmp + rotate 3 + olddir /var/log/old_logs.d +} + diff --git a/scripts/latecommand/buster/etc/logrotate.d/apt b/scripts/latecommand/buster/etc/logrotate.d/apt new file mode 100644 index 0000000..e516fbd --- /dev/null +++ b/scripts/latecommand/buster/etc/logrotate.d/apt @@ -0,0 +1,12 @@ +/var/log/apt/term.log { + rotate 12 + monthly + missingok +} + +/var/log/apt/history.log { + rotate 12 + monthly + missingok +} + diff --git a/scripts/latecommand/buster/etc/logrotate.d/aptitude b/scripts/latecommand/buster/etc/logrotate.d/aptitude new file mode 100644 index 0000000..a1ad0f5 --- /dev/null +++ b/scripts/latecommand/buster/etc/logrotate.d/aptitude @@ -0,0 +1,7 @@ +/var/log/aptitude { + rotate 6 + monthly + missingok + olddir /var/log/aptitude.d + +} diff --git a/scripts/latecommand/buster/etc/logrotate.d/dpkg b/scripts/latecommand/buster/etc/logrotate.d/dpkg new file mode 100644 index 0000000..4bce6bb --- /dev/null +++ b/scripts/latecommand/buster/etc/logrotate.d/dpkg @@ -0,0 +1,16 @@ +/var/log/alternatives.log { + rotate 12 + monthly + missingok + create 644 root root + olddir /var/log/alternatives.d +} + +/var/log/dpkg.log { + rotate 12 + monthly + missingok + create 644 root root + olddir /var/log/dpkg.d +} + diff --git a/scripts/latecommand/buster/etc/logrotate.d/rsyslog b/scripts/latecommand/buster/etc/logrotate.d/rsyslog new file mode 100644 index 0000000..76a4fc2 --- /dev/null +++ b/scripts/latecommand/buster/etc/logrotate.d/rsyslog @@ -0,0 +1,108 @@ +# Default directives are activilly used, please see /etc/logrotate.conf + +/var/log/syslog +/var/log/syslog.log +/var/log/local0.log +/var/log/local1.log +/var/log/local2.log +/var/log/local3.log +/var/log/local4.log +/var/log/local5.log +/var/log/local6.log +/var/log/local7.log +/var/log/uucp.log +{ + rotate 8 + daily + missingok + olddir /var/log/syslog.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + +/var/log/cron.log /var/log/mark.log { + maxsize 250k + missingok + sharedscripts + olddir /var/log/cron.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + +/var/log/daemon.log { + maxsize 250k + missingok + sharedscripts + olddir /var/log/daemon.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + +/var/log/kern.log /var/log/kernel.log { + maxsize 250k + missingok + sharedscripts + olddir /var/log/kern.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + +/var/log/lpr.log { + maxsize 250k + missingok + sharedscripts + olddir /var/log/lpr.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + +/var/log/mail.log +/var/log/mail.info +/var/log/mail.warn +/var/log/mail.err +{ + maxsize 250k + missingok + sharedscripts + olddir /var/log/mail.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + +/var/log/auth.log +/var/log/authpriv.log +/var/log/user.log +{ + maxsize 250k + missingok + sharedscripts + olddir /var/log/auth.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} + +/var/log/messages /var/log/debug { + maxsize 250k + missingok + sharedscripts + olddir /var/log/messages.d + + postrotate + /usr/lib/rsyslog/rsyslog-rotate + endscript +} +