]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / utils / update.php
index f71c4f430d95c328b4c5fb101f642057851f2e21..7b9338d5c03f43fcbfc0a2c578925e88cd59ae5e 100644 (file)
@@ -82,6 +82,14 @@ if (!is_null(CONST_Osm2pgsql_Flatnode_File) && CONST_Osm2pgsql_Flatnode_File) {
     $sOsm2pgsqlCmd .= ' --flat-nodes '.CONST_Osm2pgsql_Flatnode_File;
 }
 
+$sIndexCmd = CONST_BasePath.'/nominatim/nominatim.py';
+if (!$aResult['quiet']) {
+    $sIndexCmd .= ' -v';
+}
+if ($aResult['verbose']) {
+    $sIndexCmd .= ' -v';
+}
+
 if ($aResult['init-updates']) {
     // sanity check that the replication URL is correct
     $sBaseState = file_get_contents(CONST_Replication_Url.'/state.txt');
@@ -303,7 +311,11 @@ if ($aResult['recompute-word-counts']) {
 }
 
 if ($aResult['index']) {
-    $sCmd = CONST_InstallPath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances'].' -r '.$aResult['index-rank'];
+    $sCmd = $sIndexCmd
+            .' -d '.$aDSNInfo['database']
+            .' -P '.$aDSNInfo['port']
+            .' -t '.$aResult['index-instances']
+            .' -r '.$aResult['index-rank'];
     if (isset($aDSNInfo['hostspec']) && $aDSNInfo['hostspec']) {
         $sCmd .= ' -H ' . $aDSNInfo['hostspec'];
     }
@@ -343,13 +355,16 @@ if ($aResult['import-osmosis'] || $aResult['import-osmosis-all']) {
     //
     if (strpos(CONST_Replication_Url, 'download.geofabrik.de') !== false && CONST_Replication_Update_Interval < 86400) {
         fail('Error: Update interval too low for download.geofabrik.de. ' .
-             "Please check install documentation (http://nominatim.org/release-docs/latest/Import-and-Update#setting-up-the-update-process)\n");
+             "Please check install documentation (https://nominatim.org/release-docs/latest/admin/Import-and-Update#setting-up-the-update-process)\n");
     }
 
     $sImportFile = CONST_InstallPath.'/osmosischange.osc';
     $sCMDDownload = CONST_Pyosmium_Binary.' --server '.CONST_Replication_Url.' -o '.$sImportFile.' -s '.CONST_Replication_Max_Diff_size;
     $sCMDImport = $sOsm2pgsqlCmd.' '.$sImportFile;
-    $sCMDIndex = CONST_InstallPath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances'];
+    $sCMDIndex = $sIndexCmd
+                 .' -d '.$aDSNInfo['database']
+                 .' -P '.$aDSNInfo['port']
+                 .' -t '.$aResult['index-instances'];
     if (isset($aDSNInfo['hostspec']) && $aDSNInfo['hostspec']) {
         $sCMDIndex .= ' -H ' . $aDSNInfo['hostspec'];
     }