From: root Date: Thu, 26 Nov 2015 12:33:32 +0000 (+0100) Subject: committing changes in /etc after emerge run X-Git-Url: https://git.uhu-banane.org/?a=commitdiff_plain;h=033f14d9bd02c36086fc53a17797f66065d1f5b5;p=config%2Fweimar%2Fetc.git committing changes in /etc after emerge run Package changes: +app-admin/logrotate-3.9.1 --- diff --git a/.etckeeper b/.etckeeper index e07e0c9..cbdbb68 100755 --- a/.etckeeper +++ b/.etckeeper @@ -320,6 +320,7 @@ maybe chmod 0644 'cron.d/.keep_sys-process_cronie-0' maybe chmod 0750 '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/makewhatis' maybe chmod 0755 'cron.daily/mlocate' maybe chmod 0644 'cron.deny' @@ -626,7 +627,9 @@ maybe chmod 0644 'locale.conf' maybe chmod 0644 'locale.gen' maybe chmod 0644 'localtime' 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/elog-save-summary' maybe chmod 0644 'logrotate.d/hibernate-script' maybe chmod 0644 'logrotate.d/mysql' diff --git a/cron.daily/logrotate b/cron.daily/logrotate new file mode 100755 index 0000000..c6d50d4 --- /dev/null +++ b/cron.daily/logrotate @@ -0,0 +1,8 @@ +#!/bin/sh + +/usr/sbin/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