mirror of https://github.com/nextcloud/server
Merge pull request #33692 from nextcloud/update-dir
Document and use the new updateDirectory if set
This commit is contained in:
commit
16e696c9e8
|
@ -1768,6 +1768,15 @@ $CONFIG = [
|
|||
*/
|
||||
'tempdirectory' => '/tmp/nextcloudtemp',
|
||||
|
||||
/**
|
||||
* Override where Nextcloud stores update files while updating. Useful in situations
|
||||
* where the default `datadirectory` is on network disk like NFS, or is otherwise
|
||||
* restricted. Defaults to the value of `datadirectory` if unset.
|
||||
*
|
||||
* The Web server user must have write access to this directory.
|
||||
*/
|
||||
'updatedirectory' => '',
|
||||
|
||||
/**
|
||||
* Hashing
|
||||
*/
|
||||
|
|
|
@ -43,14 +43,14 @@ class MoveUpdaterStepFile implements IRepairStep {
|
|||
}
|
||||
|
||||
public function run(IOutput $output) {
|
||||
$dataDir = $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
|
||||
$updateDir = $this->config->getSystemValue('updatedirectory') ?? $this->config->getSystemValue('datadirectory', \OC::$SERVERROOT . '/data');
|
||||
$instanceId = $this->config->getSystemValue('instanceid', null);
|
||||
|
||||
if (!is_string($instanceId) || empty($instanceId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$updaterFolderPath = $dataDir . '/updater-' . $instanceId;
|
||||
$updaterFolderPath = $updateDir . '/updater-' . $instanceId;
|
||||
$stepFile = $updaterFolderPath . '/.step';
|
||||
if (file_exists($stepFile)) {
|
||||
$output->info('.step file exists');
|
||||
|
|
Loading…
Reference in New Issue