]> Frank Brehm's Git Trees - pixelpark/create-vmware-tpl.git/commitdiff
Adding Logrotate config files
authorFrank Brehm <frank.brehm@pixelpark.com>
Wed, 11 Apr 2018 12:07:14 +0000 (14:07 +0200)
committerFrank Brehm <frank.brehm@pixelpark.com>
Wed, 11 Apr 2018 12:07:14 +0000 (14:07 +0200)
files/logrotate.conf [new file with mode: 0644]
files/logrotate.d.btmp [new file with mode: 0644]
files/logrotate.d.syslog [new file with mode: 0644]
files/logrotate.d.wtmp [new file with mode: 0644]

diff --git a/files/logrotate.conf b/files/logrotate.conf
new file mode 100644 (file)
index 0000000..e5a18f8
--- /dev/null
@@ -0,0 +1,15 @@
+
+compress
+create
+dateext
+dateformat -%Y-%m-%d
+delaycompress
+missingok
+nomail
+noolddir
+notifempty
+rotate 4
+weekly
+
+# configurable file rotations
+include /etc/logrotate.d
diff --git a/files/logrotate.d.btmp b/files/logrotate.d.btmp
new file mode 100644 (file)
index 0000000..0f26cad
--- /dev/null
@@ -0,0 +1,10 @@
+
+/var/log/btmp {
+  create 0600 root utmp
+  dateext
+  dateformat -%Y-%m-%d
+  minsize 1M
+  missingok
+  monthly
+  rotate 1
+}
diff --git a/files/logrotate.d.syslog b/files/logrotate.d.syslog
new file mode 100644 (file)
index 0000000..e6b30ac
--- /dev/null
@@ -0,0 +1,14 @@
+
+/var/log/cron /var/log/maillog /var/log/messages /var/log/secure /var/log/spooler {
+  compress
+  daily
+  dateformat -%Y-%m-%d
+  delaycompress
+  minsize 4M
+  missingok
+  rotate 10
+  sharedscripts
+  postrotate
+    /bin/kill -HUP `cat /var/run/syslogd.pid 2> /dev/null` 2> /dev/null || true
+  endscript
+}
diff --git a/files/logrotate.d.wtmp b/files/logrotate.d.wtmp
new file mode 100644 (file)
index 0000000..8acb108
--- /dev/null
@@ -0,0 +1,10 @@
+
+/var/log/wtmp {
+  create 0664 root utmp
+  dateext
+  dateformat -%Y-%m-%d
+  minsize 1M
+  missingok
+  monthly
+  rotate 12
+}