X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/26bc83c9844ceba531837bfed79cd51b12a6b45a..5a772a5770b4c0ced10e7da95dee17e5052ff8de:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index a7f77e55..501ad3f2 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -62,7 +62,10 @@ if ($aCMDResult['import-data'] || $aCMDResult['all']) { // by default, use all but one processor, but never more than 15. -$iInstances = isset($aCMDResult['threads'])?$aCMDResult['threads']:(min(16,getProcessorCount())-1); +$iInstances = isset($aCMDResult['threads']) + ? $aCMDResult['threads'] + : (min(16, getProcessorCount()) - 1); + if ($iInstances < 1) { $iInstances = 1; warn("resetting threads to $iInstances"); @@ -596,6 +599,7 @@ if ($aCMDResult['create-search-indices'] || $aCMDResult['all']) { $bDidSomething = true; $sTemplate = file_get_contents(CONST_BasePath.'/sql/indices.src.sql'); + $sTemplate = str_replace('{www-user}', CONST_Database_Web_User, $sTemplate); $sTemplate = replace_tablespace( '{ts:address-index}', CONST_Tablespace_Address_Index,