X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/3546b304739f2b214667ec0127ae7762be4cd5d5..5614ece9a14741b96785d45092083a9843f1bdca:/utils/setup.php diff --git a/utils/setup.php b/utils/setup.php index 81efedf3..44bdcdc7 100755 --- a/utils/setup.php +++ b/utils/setup.php @@ -689,12 +689,16 @@ if (!$bDidSomething) { function pgsqlRunScriptFile($sFilename) { + global $aCMDResult; if (!file_exists($sFilename)) fail('unable to find '.$sFilename); // Convert database DSN to psql parameters $aDSNInfo = DB::parseDSN(CONST_Database_DSN); if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432; $sCMD = 'psql -p '.$aDSNInfo['port'].' -d '.$aDSNInfo['database']; + if (!$aCMDResult['verbose']) { + $sCMD .= ' -q'; + } $ahGzipPipes = null; if (preg_match('/\\.gz$/', $sFilename)) { @@ -745,6 +749,9 @@ function pgsqlRunScript($sScript, $bfatal = true) $aDSNInfo = DB::parseDSN(CONST_Database_DSN); if (!isset($aDSNInfo['port']) || !$aDSNInfo['port']) $aDSNInfo['port'] = 5432; $sCMD = 'psql -p '.$aDSNInfo['port'].' -d '.$aDSNInfo['database']; + if (!$aCMDResult['verbose']) { + $sCMD .= ' -q'; + } if ($bfatal && !$aCMDResult['ignore-errors']) $sCMD .= ' -v ON_ERROR_STOP=1'; $aDescriptors = array(