]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/nominatim/templates/default/update_source.erb
fix typos
[chef.git] / cookbooks / nominatim / templates / default / update_source.erb
index 49e285df92c732fe04349f628c5c7c9dfbbc78d2..17883a038adc3f9a3888cca4ee9500ee582f1cad 100644 (file)
@@ -8,7 +8,7 @@ cd <%= @source_directory %>
 ./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