]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/nominatim-update.erb
Fix log rotation on web servers
[chef.git] / cookbooks / nominatim / templates / default / nominatim-update.erb
index 9f122206ce2cbdbdfc6767894cdb734a5aebd08b..145ae6a8c6f5e15f48c7d2e725d7406152108d99 100644 (file)
@@ -8,13 +8,18 @@ starttime=`date +%s`
 
 <% if node[:nominatim][:enable_git_updates] -%>
 if /sbin/runuser -u nominatim -- <%= @bindir %>/nominatim-update-source; then
-  pushd <%= @builddir %>
-  make install
 
   if ! /sbin/runuser -u nominatim -- <%= @bindir %>/nominatim-update-refresh-db; then
     date "+%c === Database refresh failed. Stopping updates."
     exit 1
   fi
+
+  pushd <%= @builddir %>
+  make install
+
+<% if node[:nominatim][:api_flavour] == "python" -%>
+  systemctl reload nominatim
+<% end -%>
 fi
 <% end -%>