#!/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}
# 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