From f65798ea790bf17b3f4d2af28ede54787c496968 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Wed, 3 Feb 2021 23:28:31 +0100 Subject: [PATCH] daily autocommit --- .etckeeper | 2 ++ logrotate.d/apache2 | 4 ++-- logrotate.d/rsyslog | 6 +++--- logrotate.d/ulogd2 | 38 ++++++++++++++++---------------------- 4 files changed, 23 insertions(+), 27 deletions(-) diff --git a/.etckeeper b/.etckeeper index 58a6954..d8d5f06 100755 --- a/.etckeeper +++ b/.etckeeper @@ -1642,6 +1642,8 @@ maybe chmod 0644 'logcheck/ignore.d.server/rsyslog' maybe chmod 0644 'login.defs' maybe chmod 0644 'logrotate.conf' maybe chmod 0755 'logrotate.d' +maybe chmod 0755 'logrotate.d/.from-pkg' +maybe chmod 0755 'logrotate.d/.from-pkg/2021-02-03' maybe chmod 0644 'logrotate.d/alternatives' maybe chmod 0644 'logrotate.d/apache2' maybe chmod 0644 'logrotate.d/apt' diff --git a/logrotate.d/apache2 b/logrotate.d/apache2 index ca8d9f5..d82205d 100644 --- a/logrotate.d/apache2 +++ b/logrotate.d/apache2 @@ -10,8 +10,8 @@ create 640 root adm sharedscripts postrotate - if /etc/init.d/apache2 status > /dev/null ; then \ - /etc/init.d/apache2 reload > /dev/null; \ + if invoke-rc.d apache2 status > /dev/null 2>&1; then \ + invoke-rc.d apache2 reload > /dev/null 2>&1; \ fi; endscript prerotate diff --git a/logrotate.d/rsyslog b/logrotate.d/rsyslog index e74fa83..0233a2f 100644 --- a/logrotate.d/rsyslog +++ b/logrotate.d/rsyslog @@ -10,7 +10,7 @@ olddir /var/log/.old sharedscripts postrotate - invoke-rc.d rsyslog rotate > /dev/null + /usr/lib/rsyslog/rsyslog-rotate endscript } @@ -39,7 +39,7 @@ olddir /var/log/.old sharedscripts postrotate - invoke-rc.d rsyslog rotate > /dev/null + /usr/lib/rsyslog/rsyslog-rotate endscript } @@ -55,7 +55,7 @@ olddir /var/log/syslog.d/.old sharedscripts postrotate - invoke-rc.d rsyslog rotate > /dev/null + /usr/lib/rsyslog/rsyslog-rotate endscript } diff --git a/logrotate.d/ulogd2 b/logrotate.d/ulogd2 index ec70b2a..a98377f 100644 --- a/logrotate.d/ulogd2 +++ b/logrotate.d/ulogd2 @@ -1,26 +1,20 @@ -#/var/log/ulog/*.log /var/log/ulog/*.pcap { -# missingok -# compress -# sharedscripts -# create 640 ulog adm -# postrotate -# invoke-rc.d ulogd2 reload > /dev/null -# endscript -#} - -/var/log/ulog/*.log { - weekly +/var/log/ulog/*.log /var/log/ulog/*.pcap { + weekly dateext - rotate 20 - size 4M - compress - delaycompress - missingok - notifempty - create 0640 ulog adm - sharedscripts - postrotate - invoke-rc.d ulogd2 reload > /dev/null + rotate 20 + size 4M + missingok + compress + delaycompress + notifempty + sharedscripts + create 640 ulog adm + postrotate + if [ -d /run/systemd/system ] && command systemctl >/dev/null 2>&1 && systemctl is-active --quiet ulogd2.service; then + systemctl kill --kill-who main --signal=SIGHUP ulogd2.service + else + invoke-rc.d ulogd2 reload > /dev/null + fi endscript } -- 2.39.5