]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/update_source.erb
fix log file ownership
[chef.git] / cookbooks / nominatim / templates / default / update_source.erb
index 49e285df92c732fe04349f628c5c7c9dfbbc78d2..ec8f0176b94701be3258c46e496c28681a923394 100644 (file)
@@ -4,11 +4,12 @@
 
 cd <%= @source_directory %>
 
+git submodule update &&
 ./autogen.sh &&
 ./configure &&
 make
 
-psql -U postgres <%= node[:nominatim][:database][:dbname] %> -c "SELECT version();" >/dev/null 2>&1
-if [ ! $? ]; then
+psql -d <%= node[:nominatim][:database][:dbname] %> -c "SELECT version();" >/dev/null 2>&1
+if [[ "$?" == "0" ]]; then
   ./utils/setup.php --create-functions --create-partition-functions --enable-diff-updates
 fi