]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/update.php
Merge pull request #381 from lonvia/cmake-port
[nominatim.git] / utils / update.php
index cc2754633e262f34155afca5819c22074c73d45c..a91eb30ea1ddb16615d6d2e14cd9a3cb7672fc7e 100755 (executable)
@@ -64,9 +64,6 @@
        }
 */
 
        }
 */
 
-       // Assume osm2pgsql is in the folder above
-       $sBasePath = dirname(dirname(__FILE__));
-
        date_default_timezone_set('Etc/UTC');
 
        $oDB =& getDB();
        date_default_timezone_set('Etc/UTC');
 
        $oDB =& getDB();
 
        if ($aResult['index'])
        {
 
        if ($aResult['index'])
        {
-               passthru(CONST_BasePath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances'].' -r '.$aResult['index-rank']);
+               passthru(CONST_InstallPath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances'].' -r '.$aResult['index-rank']);
        }
 
        if ($aResult['import-osmosis'] || $aResult['import-osmosis-all'])
        }
 
        if ($aResult['import-osmosis'] || $aResult['import-osmosis-all'])
 
                $sImportFile = CONST_BasePath.'/data/osmosischange.osc';
                $sOsmosisCMD = CONST_Osmosis_Binary;
 
                $sImportFile = CONST_BasePath.'/data/osmosischange.osc';
                $sOsmosisCMD = CONST_Osmosis_Binary;
-               $sOsmosisConfigDirectory = CONST_BasePath.'/settings';
+               $sOsmosisConfigDirectory = CONST_InstallPath.'/settings';
                $sCMDDownload = $sOsmosisCMD.' --read-replication-interval workingDirectory='.$sOsmosisConfigDirectory.' --simplify-change --write-xml-change '.$sImportFile;
                $sCMDCheckReplicationLag = $sOsmosisCMD.' -q --read-replication-lag workingDirectory='.$sOsmosisConfigDirectory;
                $sCMDImport = $sOsm2pgsqlCmd.' '.$sImportFile;
                $sCMDDownload = $sOsmosisCMD.' --read-replication-interval workingDirectory='.$sOsmosisConfigDirectory.' --simplify-change --write-xml-change '.$sImportFile;
                $sCMDCheckReplicationLag = $sOsmosisCMD.' -q --read-replication-lag workingDirectory='.$sOsmosisConfigDirectory;
                $sCMDImport = $sOsm2pgsqlCmd.' '.$sImportFile;
-               $sCMDIndex = $sBasePath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances'];
+               $sCMDIndex = $sInstallPath.'/nominatim/nominatim -i -d '.$aDSNInfo['database'].' -P '.$aDSNInfo['port'].' -t '.$aResult['index-instances'];
                if (!$aResult['no-npi']) {
                        $sCMDIndex .= '-F ';
                }
                if (!$aResult['no-npi']) {
                        $sCMDIndex .= '-F ';
                }
                        var_dump($iNPIID);
                        exit(1);
                }
                        var_dump($iNPIID);
                        exit(1);
                }
-               $sConfigDirectory = CONST_BasePath.'/settings';
-               $sCMDImportTemplate = $sBasePath.'/nominatim/nominatim -d gazetteer -P 5433 -I -T '.$sBasePath.'/nominatim/partitionedtags.def -F ';
+               $sConfigDirectory = CONST_InstallPath.'/settings';
+               $sCMDImportTemplate = $sBasePath.'/nominatim/nominatim -d gazetteer -P 5433 -I -T '.CONST_BasePath.'/nominatim/partitionedtags.def -F ';
                while(true)
                {
                        $fStartTime = time();
                while(true)
                {
                        $fStartTime = time();