From e742fcd4c7b72f7a59d97620828b77d1d6a4b81e Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Wed, 6 Jun 2012 17:01:33 +0000 Subject: [PATCH] Fix Etherpad Lite log rotations. Etherpad Lite does not give up its log files sanely. Instead according to their bug tracker one should use logrotate's copytruncate option. So we will use copytruncate. Change-Id: Ic76d215bf35f3aa64ca5764512debb5cdcfca60e --- manifests/backup.pp | 2 +- manifests/site.pp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/backup.pp b/manifests/backup.pp index 702b6ee..1340b17 100644 --- a/manifests/backup.pp +++ b/manifests/backup.pp @@ -19,7 +19,7 @@ class etherpad_lite::backup ( include logrotate logrotate::file { 'eplitedb': log => $dest, - options => ['nocompress', 'missingok', "rotate ${num_backups}", $rotation], + options => ['nocompress', "rotate ${num_backups}", $rotation], require => Cron['eplitedbbackup'] } diff --git a/manifests/site.pp b/manifests/site.pp index 1da83b2..d8ad63e 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -41,13 +41,13 @@ class etherpad_lite::site ( include logrotate logrotate::file { 'epliteerror': log => "${etherpad_lite::base_log_dir}/${etherpad_lite::ep_user}/error.log", - options => ['compress', 'delaycompress', 'missingok', 'rotate 7', 'daily', 'notifempty'], + options => ['compress', 'copytruncate', 'missingok', 'rotate 7', 'daily', 'notifempty'], require => Service['etherpad-lite'] } logrotate::file { 'epliteaccess': log => "${etherpad_lite::base_log_dir}/${etherpad_lite::ep_user}/access.log", - options => ['compress', 'delaycompress', 'missingok', 'rotate 7', 'daily', 'notifempty'], + options => ['compress', 'copytruncate', 'missingok', 'rotate 7', 'daily', 'notifempty'], require => Service['etherpad-lite'] }