]> Frank Brehm's Git Trees - config/ns2/etc.git/commitdiff
daily autocommit
authorFrank Brehm <frank@brehm-online.com>
Tue, 19 Nov 2019 05:38:27 +0000 (06:38 +0100)
committerFrank Brehm <frank@brehm-online.com>
Tue, 19 Nov 2019 05:38:27 +0000 (06:38 +0100)
cron.daily/logrotate
logrotate.conf
logrotate.d/certbot
logrotate.d/fail2ban

index 189da6a85946220db6ad7d379efdb9151a264ccc..2166db50b1c6e4e87d3918dec49fdcd21b36d568 100755 (executable)
@@ -1,6 +1,15 @@
 #!/bin/bash
 
-test -x /usr/sbin/logrotate || exit 0
+# skip in favour of systemd timer
+if [[ -d /run/systemd/system ]]; then
+    exit 0
+fi
+
+# this cronjob persists removals (but not purges)
+if [[ ! -x /usr/sbin/logrotate ]]; then
+    exit 0
+fi
+
 LOG=/var/log/logrotate.log
 echo >> ${LOG}
 echo "################################################" >> ${LOG}
index 93870432e04c7f99b8d51ecb064f0eff823473b2..9634d7bcccf6714ecda6c7174d390657c8a34cf8 100644 (file)
@@ -5,9 +5,15 @@ weekly
 # keep 4 weeks worth of backlogs
 rotate 99
 
+missingok
+notifempty
+
 # create new (empty) log files after rotating old ones
 create
 
+dateext
+dateformat -%Y-%m-%d
+
 # uncomment this if you want your log files compressed
 compress
 delaycompress
index 05caa95e253bce2598cc7b2e9523769b7187661b..ccd55c3df02cacd6a0681476cb6349ef9c82919b 100644 (file)
@@ -2,5 +2,7 @@
     rotate 12
     weekly
     compress
+    delaycompress
+    minsize 1M
     missingok
-}
\ No newline at end of file
+}
index ea46428402d7bff0f321e88c3d9f99bf0d173d89..9556dafbc118f742cd55c1915d900330c468df9a 100644 (file)
@@ -3,6 +3,7 @@
     weekly
     rotate 4
     compress
+    minsize 4M
 
     delaycompress
     missingok