From 56258c46af38693a12525eca5724ebd86cd21b07 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Tue, 20 Dec 2016 18:55:16 +0100 Subject: [PATCH] committing changes in /etc after emerge run Package changes: +app-admin/logrotate-3.10.0 --- .etckeeper | 3 ++ cron.daily/logrotate | 8 +++++ logrotate.conf | 43 +++++++++++++++++++++++++ logrotate.d/.keep_app-admin_logrotate-0 | 0 4 files changed, 54 insertions(+) create mode 100755 cron.daily/logrotate create mode 100644 logrotate.conf create mode 100644 logrotate.d/.keep_app-admin_logrotate-0 diff --git a/.etckeeper b/.etckeeper index 80a5d62..c9e9b0a 100755 --- a/.etckeeper +++ b/.etckeeper @@ -136,6 +136,7 @@ maybe chmod 0644 'cron.d/.keep_sys-process_cronie-0' maybe chmod 0755 'cron.daily' maybe chmod 0644 'cron.daily/.keep_sys-process_cronbase-0' maybe chmod 0755 'cron.daily/etckeeper' +maybe chmod 0755 'cron.daily/logrotate' maybe chmod 0755 'cron.daily/man-db' maybe chmod 0755 'cron.daily/mlocate' maybe chmod 0644 'cron.deny' @@ -373,7 +374,9 @@ maybe chmod 0644 'local.d/README' maybe chmod 0644 'locale.conf' maybe chmod 0644 'locale.gen' maybe chmod 0644 'login.defs' +maybe chmod 0644 'logrotate.conf' maybe chmod 0755 'logrotate.d' +maybe chmod 0644 'logrotate.d/.keep_app-admin_logrotate-0' maybe chmod 0644 'logrotate.d/apache2' maybe chmod 0644 'logrotate.d/elog-save-summary' maybe chmod 0644 'logrotate.d/openrc' diff --git a/cron.daily/logrotate b/cron.daily/logrotate new file mode 100755 index 0000000..67ff626 --- /dev/null +++ b/cron.daily/logrotate @@ -0,0 +1,8 @@ +#!/bin/sh + +/usr/bin/logrotate /etc/logrotate.conf +EXITVALUE=$? +if [ $EXITVALUE != 0 ]; then + /usr/bin/logger -t logrotate "ALERT exited abnormally with [$EXITVALUE]" +fi +exit 0 diff --git a/logrotate.conf b/logrotate.conf new file mode 100644 index 0000000..b6292ec --- /dev/null +++ b/logrotate.conf @@ -0,0 +1,43 @@ +# $Id$ +# +# Default logrotate(8) configuration file for Gentoo Linux. +# See "man logrotate" for details. + +# rotate log files weekly. +weekly +#daily + +# keep 4 weeks worth of backlogs. +rotate 4 + +# create new (empty) log files after rotating old ones. +create + +# use date as a suffix of the rotated file. +dateext + +# compress rotated log files. +compress + +notifempty +nomail +noolddir + +# packages can drop log rotation information into this directory. +include /etc/logrotate.d + +# no packages own wtmp and btmp -- we'll rotate them here. +/var/log/wtmp { + monthly + create 0664 root utmp + minsize 1M + rotate 1 +} +/var/log/btmp { + missingok + monthly + create 0600 root utmp + rotate 1 +} + +# system-specific logs may be also be configured here. diff --git a/logrotate.d/.keep_app-admin_logrotate-0 b/logrotate.d/.keep_app-admin_logrotate-0 new file mode 100644 index 0000000..e69de29 -- 2.39.5