From 8008720fb17c646470e5232d129a3b025957ccab Mon Sep 17 00:00:00 2001 From: mhoellein Date: Tue, 28 Jan 2020 00:21:19 +0100 Subject: [PATCH] daily autocommit --- .etckeeper | 2 ++ apcupsd/apcupsd.conf | 6 +++--- logrotate.d/apcupsd | 11 +++++++++++ logrotate.d/dhcp | 8 ++++++++ 4 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 logrotate.d/apcupsd create mode 100644 logrotate.d/dhcp diff --git a/.etckeeper b/.etckeeper index 8feb8d28..ece3023e 100755 --- a/.etckeeper +++ b/.etckeeper @@ -6802,6 +6802,7 @@ maybe chmod 0644 'logrotate.conf' maybe chmod 0755 'logrotate.d' maybe chmod 0644 'logrotate.d/alternatives' maybe chmod 0644 'logrotate.d/apache2' +maybe chmod 0644 'logrotate.d/apcupsd' maybe chmod 0644 'logrotate.d/apt' maybe chmod 0644 'logrotate.d/aptitude' maybe chmod 0644 'logrotate.d/asterisk' @@ -6809,6 +6810,7 @@ maybe chmod 0644 'logrotate.d/certbot' maybe chmod 0644 'logrotate.d/consolekit' maybe chmod 0644 'logrotate.d/cups-daemon' maybe chmod 0644 'logrotate.d/dbconfig-common' +maybe chmod 0644 'logrotate.d/dhcp' maybe chmod 0644 'logrotate.d/dpkg' maybe chmod 0644 'logrotate.d/fail2ban' maybe chmod 0644 'logrotate.d/homematic' diff --git a/apcupsd/apcupsd.conf b/apcupsd/apcupsd.conf index dbedc799..0695d094 100644 --- a/apcupsd/apcupsd.conf +++ b/apcupsd/apcupsd.conf @@ -249,7 +249,7 @@ UPSMODE disable # # Time interval in seconds between writing the STATUS file; 0 disables -STATTIME 0 +STATTIME 300 # Location of STATUS file (written to only if STATTIME is non-zero) STATFILE /var/log/apcupsd.status @@ -259,11 +259,11 @@ STATFILE /var/log/apcupsd.status # you turn this on, be sure that the # file defined in syslog.conf for LOG_NOTICE is a named pipe. # You probably do not want this on. -LOGSTATS off +LOGSTATS on # Time interval in seconds between writing the DATA records to # the log file. 0 disables. -DATATIME 0 +DATATIME 300 # FACILITY defines the logging facility (class) for logging to syslog. # If not specified, it defaults to "daemon". This is useful diff --git a/logrotate.d/apcupsd b/logrotate.d/apcupsd new file mode 100644 index 00000000..cbdc81ee --- /dev/null +++ b/logrotate.d/apcupsd @@ -0,0 +1,11 @@ +/var/log/apcupsd.status /var/log/apcupsd.events { + missingok + weekly + size=+5M + rotate 7 + compress + su + postrotate + /bin/systemctl restart apcupsd.service >/dev/null 2>&1 || true + endscript +} diff --git a/logrotate.d/dhcp b/logrotate.d/dhcp new file mode 100644 index 00000000..3aa7a0aa --- /dev/null +++ b/logrotate.d/dhcp @@ -0,0 +1,8 @@ +/var/log/dhcp.log { + missingok + weekly + size=+5M + rotate 5 + compress + su +} -- 2.43.0