X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/57db5819efb1eac7497aca2dbdb2493a67bd33f9..c7f40e3cee2853ade0e16a90ab7a3b29b02265f9:/lib-php/admin/setup.php diff --git a/lib-php/admin/setup.php b/lib-php/admin/setup.php index 6493460d..f8e360bb 100644 --- a/lib-php/admin/setup.php +++ b/lib-php/admin/setup.php @@ -57,19 +57,24 @@ setupHTTPProxy(); $bDidSomething = false; $oNominatimCmd = new \Nominatim\Shell(getSetting('NOMINATIM_TOOL')); -if (isset($aCMDResult['quiet']) && $aCMDResult['quiet']) { - $oNominatimCmd->addParams('--quiet'); -} -if ($aCMDResult['verbose']) { - $oNominatimCmd->addParams('--verbose'); -} // by default, use all but one processor, but never more than 15. $iInstances = max(1, $aCMDResult['threads'] ?? (min(16, getProcessorCount()) - 1)); -function run($oCmd) { +function run($oCmd) +{ global $iInstances; + global $aCMDResult; $oCmd->addParams('--threads', $iInstances); + if ($aCMDResult['ignore-errors'] ?? false) { + $oCmd->addParams('--ignore-errors'); + } + if ($aCMDResult['quiet'] ?? false) { + $oCmd->addParams('--quiet'); + } + if ($aCMDResult['verbose'] ?? false) { + $oCmd->addParams('--verbose'); + } $oCmd->run(true); }