]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/logrotate.apache.erb
nominatim: switch apache reload method for logrotate
[chef.git] / cookbooks / nominatim / templates / default / logrotate.apache.erb
index 170ddb1898be1bf8d2724080dfb3aaa10293a700..7f28a2047d634c04485d2fe91b142167d82b5405 100644 (file)
@@ -10,6 +10,8 @@
   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
 }