]> git.openstreetmap.org Git - chef.git/commitdiff
nominatim: switch apache reload method for logrotate
authorSarah Hoffmann <lonvia@denofr.de>
Mon, 24 Oct 2016 08:17:29 +0000 (10:17 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Mon, 24 Oct 2016 08:19:32 +0000 (10:19 +0200)
Apache reload stopped working with upgrade to Ubuntu 16.04.

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
 }