From dd28c9af2e514e27bb053a98851b6c1c5aea44f8 Mon Sep 17 00:00:00 2001 From: Adam Thorn <alt36@cam.ac.uk> Date: Tue, 24 May 2022 15:34:21 +0100 Subject: [PATCH] Cease trying to configure dateext logrotation in prepare script On servers we configure this via ansible. On workstations it is not having the desired effect because the stock logrotate.conf includes the line ... and so the simple grep thinks it's already configured! I'll add an ansible task in due course to actually configure this. --- ROOT/etc/chem-zfs-backup-server/zfs-rsync.d/prepare | 2 -- 1 file changed, 2 deletions(-) diff --git a/ROOT/etc/chem-zfs-backup-server/zfs-rsync.d/prepare b/ROOT/etc/chem-zfs-backup-server/zfs-rsync.d/prepare index bbb5d09..6945e77 100755 --- a/ROOT/etc/chem-zfs-backup-server/zfs-rsync.d/prepare +++ b/ROOT/etc/chem-zfs-backup-server/zfs-rsync.d/prepare @@ -24,8 +24,6 @@ if $SSH root@$SERVER [ /var/lib/dpkg/status -nt /var/adm/backup/package-files ] FILELIST=\`tempfile\` CONFLIST=\`tempfile\` mkdir -p /var/adm/backup - # Make logrotate use datestamps - if ! grep -q dateext /etc/logrotate.conf ; then sed -i 's/^include/dateext\ninclude/' /etc/logrotate.conf ; fi # Which packages are installed? dpkg --get-selections | awk ' { print \$1 ; } ' >/var/adm/backup/packages cat /var/lib/dpkg/info/*.list | while read F ; do [ -f \"\$F\" ] && echo \"\$F\" ; done | sort > \$FILELIST -- GitLab