From: Peter Palfrader Date: Fri, 28 Jun 2013 08:30:00 +0000 (+0200) Subject: Do not use "su" in logrotate on squeeze X-Git-Url: https://git.donarmstrong.com/?p=dsa-puppet.git;a=commitdiff_plain;h=11c88124f503b07033fe7540aa7b916ebb2a0b62 Do not use "su" in logrotate on squeeze --- diff --git a/modules/dacs/files/common/dacs.logrotate b/modules/dacs/files/common/dacs.logrotate deleted file mode 100644 index 789e3344..00000000 --- a/modules/dacs/files/common/dacs.logrotate +++ /dev/null @@ -1,16 +0,0 @@ -## -## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. -## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git -## - -/var/log/dacs/*log { - daily - dateext - missingok - rotate 28 - compress - delaycompress - create 640 www-data www-data - su root www-data - sharedscripts -} diff --git a/modules/dacs/manifests/init.pp b/modules/dacs/manifests/init.pp index f1d5496a..3eb93920 100644 --- a/modules/dacs/manifests/init.pp +++ b/modules/dacs/manifests/init.pp @@ -39,7 +39,7 @@ class dacs { purge => true } file { '/etc/logrotate.d/dacs': - source => 'puppet:///modules/dacs/common/dacs.logrotate', + content => template('dacs/dacs.logrotate.erb'), owner => root, group => root, mode => '0644', diff --git a/modules/dacs/templates/dacs.logrotate.erb b/modules/dacs/templates/dacs.logrotate.erb new file mode 100644 index 00000000..5587631c --- /dev/null +++ b/modules/dacs/templates/dacs.logrotate.erb @@ -0,0 +1,20 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +/var/log/dacs/*log { + daily + dateext + missingok + rotate 28 + compress + delaycompress + create 640 www-data www-data +<% if @lsbmajdistrelease >= '7' -%> + su root www-data +<% else -%> + notifempty +<% end -%> + sharedscripts +}