]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/logrotate.apache.erb
nominatim: reduce number of logs kept
[chef.git] / cookbooks / nominatim / templates / default / logrotate.apache.erb
index 170ddb1898be1bf8d2724080dfb3aaa10293a700..4948b5ce1272b263fcffbc2db3be1f9b0193131a 100644 (file)
@@ -3,13 +3,15 @@
 /var/log/apache2/*.log {
   weekly
   missingok
-  rotate 8
+  rotate 6
   compress
   delaycompress
   notifempty
   create 640 root adm
   sharedscripts
   postrotate
-    /usr/bin/service apache2 reload > /dev/null 2>&1
+    if /etc/init.d/apache2 status > /dev/null ; then \
+        /etc/init.d/apache2 reload > /dev/null; \
+    fi;
   endscript
 }