Merge pull request #8219 from nextcloud/fix-overwrite-url-on-cli-install
Fix proper overwrite URL on CLI install
This commit is contained in:
commit
640db3d5fe
|
@ -325,15 +325,20 @@ class Setup {
|
||||||
$secret = $this->random->generate(48);
|
$secret = $this->random->generate(48);
|
||||||
|
|
||||||
//write the config file
|
//write the config file
|
||||||
$this->config->setValues([
|
$newConfigValues = [
|
||||||
'passwordsalt' => $salt,
|
'passwordsalt' => $salt,
|
||||||
'secret' => $secret,
|
'secret' => $secret,
|
||||||
'trusted_domains' => $trustedDomains,
|
'trusted_domains' => $trustedDomains,
|
||||||
'datadirectory' => $dataDir,
|
'datadirectory' => $dataDir,
|
||||||
'overwrite.cli.url' => $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT,
|
|
||||||
'dbtype' => $dbType,
|
'dbtype' => $dbType,
|
||||||
'version' => implode('.', \OCP\Util::getVersion()),
|
'version' => implode('.', \OCP\Util::getVersion()),
|
||||||
]);
|
];
|
||||||
|
|
||||||
|
if ($this->config->getValue('overwrite.cli.url', null) === null) {
|
||||||
|
$newConfigValues['overwrite.cli.url'] = $request->getServerProtocol() . '://' . $request->getInsecureServerHost() . \OC::$WEBROOT;
|
||||||
|
}
|
||||||
|
|
||||||
|
$this->config->setValues($newConfigValues);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$dbSetup->initialize($options);
|
$dbSetup->initialize($options);
|
||||||
|
|
Loading…
Reference in New Issue