Make 'trustedCacertsDir' an attribute

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
Pablo Zmdl 2026-01-26 10:09:32 +01:00
parent 63245430ef
commit 4ad8fcf258
2 changed files with 5 additions and 7 deletions

View file

@ -134,7 +134,7 @@ readonly class ContainerDefinitionFetcher {
continue;
}
} elseif ($value['source'] === '%NEXTCLOUD_TRUSTED_CACERTS_DIR%') {
$value['source'] = $this->configurationManager->GetTrustedCacertsDir();
$value['source'] = $this->configurationManager->trustedCacertsDir;
if($value['source'] === '') {
continue;
}

View file

@ -672,11 +672,9 @@ class ConfigurationManager
set { $this->set('docker_socket_path', $value); }
}
public function GetTrustedCacertsDir() : string {
$envVariableName = 'NEXTCLOUD_TRUSTED_CACERTS_DIR';
$configName = 'trusted_cacerts_dir';
$defaultValue = '';
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
public string $trustedCacertsDir {
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_TRUSTED_CACERTS_DIR', 'trusted_cacerts_dir', '');
set { $this->set('trusted_cacerts_dir', $value); }
}
public function GetNextcloudAdditionalApks() : string {
@ -1073,7 +1071,7 @@ class ConfigurationManager
'NEXTCLOUD_MAX_TIME' => $this->nextcloudMaxTime,
'BORG_RETENTION_POLICY' => $this->borgRetentionPolicy,
'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->fulltextsearchJavaOptions,
'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->GetTrustedCacertsDir(),
'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->trustedCacertsDir,
'ADDITIONAL_DIRECTORIES_BACKUP' => $this->GetAdditionalBackupDirectoriesString() !== '' ? 'yes' : '',
'BORGBACKUP_HOST_LOCATION' => $this->borgBackupHostLocation,
'APACHE_MAX_SIZE' => (string)($this->GetApacheMaxSize()),