]> git.openstreetmap.org Git - nominatim.git/blobdiff - utils/setup.php
respect --osm2pgsql-cache setting
[nominatim.git] / utils / setup.php
index 3c038e66d66f2f2e3f1ac2849a9ea32e108088f1..14fe675e9c2173b79a6298fc673b44c53739a4df 100755 (executable)
        }
 
        // Assume we can steal all the cache memory in the box (unless told otherwise)
-       $iCacheMemory = (isset($aCMDResult['osm2pgsql-cache'])?$aCMDResult['osm2pgsql-cache']:getCacheMemoryMB());
-       if ($iCacheMemory > getTotalMemoryMB())
+       if (isset($aCMDResult['osm2pgsql-cache']))
+       {
+               $iCacheMemory = $aCMDResult['osm2pgsql-cache'];
+       }
+       else
        {
                $iCacheMemory = getCacheMemoryMB();
-               echo "WARNING: resetting cache memory to $iCacheMemory\n";
        }
 
        $aDSNInfo = DB::parseDSN(CONST_Database_DSN);
                        $aDBInstances[$i] =& getDB(true);
                }
 
-               foreach(glob(CONST_BasePath.'/data/tiger2014/*.sql') as $sFile)
+               foreach(glob(CONST_Tiger_Data_Path.'/*.sql') as $sFile)
                {
                        echo $sFile.': ';
                        $hFile = fopen($sFile, "r");
                @symlink(CONST_BasePath.'/website/reverse.php', $sTargetDir.'/reverse.php');
                @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/search.php');
                @symlink(CONST_BasePath.'/website/search.php', $sTargetDir.'/index.php');
+               @symlink(CONST_BasePath.'/website/lookup.php', $sTargetDir.'/lookup.php');
                @symlink(CONST_BasePath.'/website/deletable.php', $sTargetDir.'/deletable.php');
                @symlink(CONST_BasePath.'/website/polygons.php', $sTargetDir.'/polygons.php');
                @symlink(CONST_BasePath.'/website/status.php', $sTargetDir.'/status.php');