create 640 root adm
sharedscripts
postrotate
- /etc/init.d/apache2 reload > /dev/null
+ /etc/init.d/apache2 reload &> /dev/null
endscript
prerotate
if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
command => "/etc/init.d/apache2 force-reload",
refreshonly => true,
}
+
+ # Avoid this logrotate error:
+ # /usr/sbin/apache2ctl: 87: ulimit: error setting limit (Operation not permitted)
+ file { '/etc/logrotate.d/apache2':
+ ensure => present,
+ owner => root,
+ group => root,
+ mode => 0644,
+ source => $::virtual ? {
+ 'vserver' => 'puppet:///modules/apache/logrotate',
+ default => undef,
+ },
+ }
}