summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--files/logrotate2
-rw-r--r--manifests/init.pp13
2 files changed, 14 insertions, 1 deletions
diff --git a/files/logrotate b/files/logrotate
index 73cc252..7c71488 100644
--- a/files/logrotate
+++ b/files/logrotate
@@ -8,7 +8,7 @@
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 \
diff --git a/manifests/init.pp b/manifests/init.pp
index cbdd051..5796fe0 100644
--- a/manifests/init.pp
+++ b/manifests/init.pp
@@ -204,4 +204,17 @@ class apache(
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,
+ },
+ }
}