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 170ddb1..7f28a20 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
 }