]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/nominatim-update.erb
nominatim: migrate versions before installing the software
[chef.git] / cookbooks / nominatim / templates / default / nominatim-update.erb
index 6bff200e147c74e57f1fc057b69e5b3a6e540224..145ae6a8c6f5e15f48c7d2e725d7406152108d99 100644 (file)
@@ -8,16 +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 node[:nominatim][:api_flavour] == "python" -%>
-  systemctl reload nominatim
-<% end -%>
 
   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 -%>