From be168e51b66e1e346e5abab077b291ca088fc22c 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 --- modules/etherpad_lite/manifests/backup.pp | 2 +- modules/etherpad_lite/manifests/site.pp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/etherpad_lite/manifests/backup.pp b/modules/etherpad_lite/manifests/backup.pp index 702b6ee482..1340b178b4 100644 --- a/modules/etherpad_lite/manifests/backup.pp +++ b/modules/etherpad_lite/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/modules/etherpad_lite/manifests/site.pp b/modules/etherpad_lite/manifests/site.pp index 1da83b2549..d8ad63e468 100644 --- a/modules/etherpad_lite/manifests/site.pp +++ b/modules/etherpad_lite/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'] }