]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/nominatim-update-refresh-db.erb
nominatim: migrate versions before installing the software
[chef.git] / cookbooks / nominatim / templates / default / nominatim-update-refresh-db.erb
index f3de24347b348b8ec5062fa15fc1dd8084208431..6d7b415962d53fbd87dc4646884118141208995d 100644 (file)
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/bash -e
 
 # DO NOT EDIT - This file is being maintained by Chef
 
@@ -6,5 +6,7 @@ date "+%c === Refresh database after software updates"
 
 cd <%= @projectdir %>
 
-nominatim admin --migrate
-nominatim refresh --functions --address-levels --website
+# Run the migrations from the nominatim version in the build directory,
+# so they can execute while the frontend doesn't have the new code yet.
+<%= @builddir %>/nominatim admin --migrate
+<%= @builddir %>/nominatim refresh --functions --address-levels --website