mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Lower case method names in ConfigurationManager
Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
This commit is contained in:
parent
5752556e4f
commit
bf43a6dae6
5 changed files with 86 additions and 86 deletions
|
|
@ -95,10 +95,10 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
||||||
'apache_port' => $configurationManager->apachePort,
|
'apache_port' => $configurationManager->apachePort,
|
||||||
'borg_backup_host_location' => $configurationManager->borgBackupHostLocation,
|
'borg_backup_host_location' => $configurationManager->borgBackupHostLocation,
|
||||||
'borg_remote_repo' => $configurationManager->borgRemoteRepo,
|
'borg_remote_repo' => $configurationManager->borgRemoteRepo,
|
||||||
'borg_public_key' => $configurationManager->GetBorgPublicKey(),
|
'borg_public_key' => $configurationManager->getBorgPublicKey(),
|
||||||
'nextcloud_password' => $configurationManager->GetAndGenerateSecret('NEXTCLOUD_PASSWORD'),
|
'nextcloud_password' => $configurationManager->getAndGenerateSecret('NEXTCLOUD_PASSWORD'),
|
||||||
'containers' => (new \AIO\ContainerDefinitionFetcher($container->get(\AIO\Data\ConfigurationManager::class), $container))->FetchDefinition(),
|
'containers' => (new \AIO\ContainerDefinitionFetcher($container->get(\AIO\Data\ConfigurationManager::class), $container))->FetchDefinition(),
|
||||||
'borgbackup_password' => $configurationManager->GetAndGenerateSecret('BORGBACKUP_PASSWORD'),
|
'borgbackup_password' => $configurationManager->getAndGenerateSecret('BORGBACKUP_PASSWORD'),
|
||||||
'is_mastercontainer_update_available' => ( $bypass_mastercontainer_update ? false : $dockerActionManager->IsMastercontainerUpdateAvailable() ),
|
'is_mastercontainer_update_available' => ( $bypass_mastercontainer_update ? false : $dockerActionManager->IsMastercontainerUpdateAvailable() ),
|
||||||
'has_backup_run_once' => $configurationManager->hasBackupRunOnce(),
|
'has_backup_run_once' => $configurationManager->hasBackupRunOnce(),
|
||||||
'is_backup_container_running' => $dockerActionManager->isBackupContainerRunning(),
|
'is_backup_container_running' => $dockerActionManager->isBackupContainerRunning(),
|
||||||
|
|
@ -107,15 +107,15 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
||||||
'borg_backup_mode' => $configurationManager->backupMode,
|
'borg_backup_mode' => $configurationManager->backupMode,
|
||||||
'was_start_button_clicked' => $configurationManager->wasStartButtonClicked,
|
'was_start_button_clicked' => $configurationManager->wasStartButtonClicked,
|
||||||
'has_update_available' => $dockerActionManager->isAnyUpdateAvailable(),
|
'has_update_available' => $dockerActionManager->isAnyUpdateAvailable(),
|
||||||
'last_backup_time' => $configurationManager->GetLastBackupTime(),
|
'last_backup_time' => $configurationManager->getLastBackupTime(),
|
||||||
'backup_times' => $configurationManager->GetBackupTimes(),
|
'backup_times' => $configurationManager->getBackupTimes(),
|
||||||
'current_channel' => $dockerActionManager->GetCurrentChannel(),
|
'current_channel' => $dockerActionManager->GetCurrentChannel(),
|
||||||
'is_clamav_enabled' => $configurationManager->isClamavEnabled,
|
'is_clamav_enabled' => $configurationManager->isClamavEnabled,
|
||||||
'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled,
|
'is_onlyoffice_enabled' => $configurationManager->isOnlyofficeEnabled,
|
||||||
'is_collabora_enabled' => $configurationManager->isCollaboraEnabled,
|
'is_collabora_enabled' => $configurationManager->isCollaboraEnabled,
|
||||||
'is_talk_enabled' => $configurationManager->isTalkEnabled,
|
'is_talk_enabled' => $configurationManager->isTalkEnabled,
|
||||||
'borg_restore_password' => $configurationManager->borgRestorePassword,
|
'borg_restore_password' => $configurationManager->borgRestorePassword,
|
||||||
'daily_backup_time' => $configurationManager->GetDailyBackupTime(),
|
'daily_backup_time' => $configurationManager->getDailyBackupTime(),
|
||||||
'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(),
|
'is_daily_backup_running' => $configurationManager->isDailyBackupRunning(),
|
||||||
'timezone' => $configurationManager->timezone,
|
'timezone' => $configurationManager->timezone,
|
||||||
'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation),
|
'skip_domain_validation' => $configurationManager->shouldDomainValidationBeSkipped($skip_domain_validation),
|
||||||
|
|
@ -126,7 +126,7 @@ $app->get('/containers', function (Request $request, Response $response, array $
|
||||||
'is_backup_section_enabled' => !$configurationManager->disableBackupSection,
|
'is_backup_section_enabled' => !$configurationManager->disableBackupSection,
|
||||||
'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled,
|
'is_imaginary_enabled' => $configurationManager->isImaginaryEnabled,
|
||||||
'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled,
|
'is_fulltextsearch_enabled' => $configurationManager->isFulltextsearchEnabled,
|
||||||
'additional_backup_directories' => $configurationManager->GetAdditionalBackupDirectoriesString(),
|
'additional_backup_directories' => $configurationManager->getAdditionalBackupDirectoriesString(),
|
||||||
'nextcloud_datadir' => $configurationManager->nextcloudDatadirMount,
|
'nextcloud_datadir' => $configurationManager->nextcloudDatadirMount,
|
||||||
'nextcloud_mount' => $configurationManager->nextcloudMount,
|
'nextcloud_mount' => $configurationManager->nextcloudMount,
|
||||||
'nextcloud_upload_limit' => $configurationManager->nextcloudUploadLimit,
|
'nextcloud_upload_limit' => $configurationManager->nextcloudUploadLimit,
|
||||||
|
|
|
||||||
|
|
@ -246,7 +246,7 @@ readonly class ContainerDefinitionFetcher {
|
||||||
// All secrets are registered with the configuration when they
|
// All secrets are registered with the configuration when they
|
||||||
// are discovered so they can be later generated at time-of-use.
|
// are discovered so they can be later generated at time-of-use.
|
||||||
foreach ($entry['secrets'] as $secret) {
|
foreach ($entry['secrets'] as $secret) {
|
||||||
$this->configurationManager->RegisterSecret($secret);
|
$this->configurationManager->registerSecret($secret);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,26 +20,26 @@ readonly class ConfigurationController {
|
||||||
if (isset($request->getParsedBody()['domain'])) {
|
if (isset($request->getParsedBody()['domain'])) {
|
||||||
$domain = $request->getParsedBody()['domain'] ?? '';
|
$domain = $request->getParsedBody()['domain'] ?? '';
|
||||||
$skipDomainValidation = isset($request->getParsedBody()['skip_domain_validation']);
|
$skipDomainValidation = isset($request->getParsedBody()['skip_domain_validation']);
|
||||||
$this->configurationManager->SetDomain($domain, $skipDomainValidation);
|
$this->configurationManager->setDomain($domain, $skipDomainValidation);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['current-master-password']) || isset($request->getParsedBody()['new-master-password'])) {
|
if (isset($request->getParsedBody()['current-master-password']) || isset($request->getParsedBody()['new-master-password'])) {
|
||||||
$currentMasterPassword = $request->getParsedBody()['current-master-password'] ?? '';
|
$currentMasterPassword = $request->getParsedBody()['current-master-password'] ?? '';
|
||||||
$newMasterPassword = $request->getParsedBody()['new-master-password'] ?? '';
|
$newMasterPassword = $request->getParsedBody()['new-master-password'] ?? '';
|
||||||
$this->configurationManager->ChangeMasterPassword($currentMasterPassword, $newMasterPassword);
|
$this->configurationManager->changeMasterPassword($currentMasterPassword, $newMasterPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['borg_backup_host_location']) || isset($request->getParsedBody()['borg_remote_repo'])) {
|
if (isset($request->getParsedBody()['borg_backup_host_location']) || isset($request->getParsedBody()['borg_remote_repo'])) {
|
||||||
$location = $request->getParsedBody()['borg_backup_host_location'] ?? '';
|
$location = $request->getParsedBody()['borg_backup_host_location'] ?? '';
|
||||||
$borgRemoteRepo = $request->getParsedBody()['borg_remote_repo'] ?? '';
|
$borgRemoteRepo = $request->getParsedBody()['borg_remote_repo'] ?? '';
|
||||||
$this->configurationManager->SetBorgLocationVars($location, $borgRemoteRepo);
|
$this->configurationManager->setBorgLocationVars($location, $borgRemoteRepo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['borg_restore_host_location']) || isset($request->getParsedBody()['borg_restore_remote_repo']) || isset($request->getParsedBody()['borg_restore_password'])) {
|
if (isset($request->getParsedBody()['borg_restore_host_location']) || isset($request->getParsedBody()['borg_restore_remote_repo']) || isset($request->getParsedBody()['borg_restore_password'])) {
|
||||||
$restoreLocation = $request->getParsedBody()['borg_restore_host_location'] ?? '';
|
$restoreLocation = $request->getParsedBody()['borg_restore_host_location'] ?? '';
|
||||||
$borgRemoteRepo = $request->getParsedBody()['borg_restore_remote_repo'] ?? '';
|
$borgRemoteRepo = $request->getParsedBody()['borg_restore_remote_repo'] ?? '';
|
||||||
$borgPassword = $request->getParsedBody()['borg_restore_password'] ?? '';
|
$borgPassword = $request->getParsedBody()['borg_restore_password'] ?? '';
|
||||||
$this->configurationManager->SetBorgRestoreLocationVarsAndPassword($restoreLocation, $borgRemoteRepo, $borgPassword);
|
$this->configurationManager->setBorgRestoreLocationVarsAndPassword($restoreLocation, $borgRemoteRepo, $borgPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['daily_backup_time'])) {
|
if (isset($request->getParsedBody()['daily_backup_time'])) {
|
||||||
|
|
@ -54,16 +54,16 @@ readonly class ConfigurationController {
|
||||||
$successNotification = false;
|
$successNotification = false;
|
||||||
}
|
}
|
||||||
$dailyBackupTime = $request->getParsedBody()['daily_backup_time'] ?? '';
|
$dailyBackupTime = $request->getParsedBody()['daily_backup_time'] ?? '';
|
||||||
$this->configurationManager->SetDailyBackupTime($dailyBackupTime, $enableAutomaticUpdates, $successNotification);
|
$this->configurationManager->setDailyBackupTime($dailyBackupTime, $enableAutomaticUpdates, $successNotification);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['delete_daily_backup_time'])) {
|
if (isset($request->getParsedBody()['delete_daily_backup_time'])) {
|
||||||
$this->configurationManager->DeleteDailyBackupTime();
|
$this->configurationManager->deleteDailyBackupTime();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['additional_backup_directories'])) {
|
if (isset($request->getParsedBody()['additional_backup_directories'])) {
|
||||||
$additionalBackupDirectories = $request->getParsedBody()['additional_backup_directories'] ?? '';
|
$additionalBackupDirectories = $request->getParsedBody()['additional_backup_directories'] ?? '';
|
||||||
$this->configurationManager->SetAdditionalBackupDirectories($additionalBackupDirectories);
|
$this->configurationManager->setAdditionalBackupDirectories($additionalBackupDirectories);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['delete_timezone'])) {
|
if (isset($request->getParsedBody()['delete_timezone'])) {
|
||||||
|
|
@ -112,7 +112,7 @@ readonly class ConfigurationController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
if (isset($request->getParsedBody()['delete_collabora_dictionaries'])) {
|
||||||
$this->configurationManager->DeleteCollaboraDictionaries();
|
$this->configurationManager->deleteCollaboraDictionaries();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['collabora_dictionaries'])) {
|
if (isset($request->getParsedBody()['collabora_dictionaries'])) {
|
||||||
|
|
@ -130,7 +130,7 @@ readonly class ConfigurationController {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($request->getParsedBody()['delete_borg_backup_location_vars'])) {
|
if (isset($request->getParsedBody()['delete_borg_backup_location_vars'])) {
|
||||||
$this->configurationManager->DeleteBorgBackupLocationItems();
|
$this->configurationManager->deleteBorgBackupLocationItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response->withStatus(201)->withHeader('Location', '.');
|
return $response->withStatus(201)->withHeader('Location', '.');
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ class ConfigurationManager
|
||||||
|
|
||||||
public string $domain {
|
public string $domain {
|
||||||
get => $this->get('domain', '');
|
get => $this->get('domain', '');
|
||||||
set { $this->SetDomain($value); }
|
set { $this->setDomain($value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $borgBackupHostLocation {
|
public string $borgBackupHostLocation {
|
||||||
|
|
@ -138,7 +138,7 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $apacheIpBinding {
|
public string $apacheIpBinding {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('APACHE_IP_BINDING', 'apache_ip_binding', '');
|
get => $this->getEnvironmentalVariableOrConfig('APACHE_IP_BINDING', 'apache_ip_binding', '');
|
||||||
set { $this->set('apache_ip_binding', $value); }
|
set { $this->set('apache_ip_binding', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -189,106 +189,106 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $apachePort {
|
public string $apachePort {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('APACHE_PORT', 'apache_port', '443');
|
get => $this->getEnvironmentalVariableOrConfig('APACHE_PORT', 'apache_port', '443');
|
||||||
set { $this->set('apache_port', $value); }
|
set { $this->set('apache_port', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $talkPort {
|
public string $talkPort {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('TALK_PORT', 'talk_port', '3478');
|
get => $this->getEnvironmentalVariableOrConfig('TALK_PORT', 'talk_port', '3478');
|
||||||
set { $this->set('talk_port', $value); }
|
set { $this->set('talk_port', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $nextcloudMount {
|
public string $nextcloudMount {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_MOUNT', 'nextcloud_mount', '');
|
get => $this->getEnvironmentalVariableOrConfig('NEXTCLOUD_MOUNT', 'nextcloud_mount', '');
|
||||||
set { $this->set('nextcloud_mount', $value); }
|
set { $this->set('nextcloud_mount', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $nextcloudDatadirMount {
|
public string $nextcloudDatadirMount {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_DATADIR', 'nextcloud_datadir', 'nextcloud_aio_nextcloud_data');
|
get => $this->getEnvironmentalVariableOrConfig('NEXTCLOUD_DATADIR', 'nextcloud_datadir', 'nextcloud_aio_nextcloud_data');
|
||||||
set { $this->set('nextcloud_datadir_mount', $value); }
|
set { $this->set('nextcloud_datadir_mount', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $nextcloudUploadLimit {
|
public string $nextcloudUploadLimit {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_UPLOAD_LIMIT', 'nextcloud_upload_limit', '16G');
|
get => $this->getEnvironmentalVariableOrConfig('NEXTCLOUD_UPLOAD_LIMIT', 'nextcloud_upload_limit', '16G');
|
||||||
set { $this->set('nextcloud_upload_limit', $value); }
|
set { $this->set('nextcloud_upload_limit', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $nextcloudMemoryLimit {
|
public string $nextcloudMemoryLimit {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_MEMORY_LIMIT', 'nextcloud_memory_limit', '512M');
|
get => $this->getEnvironmentalVariableOrConfig('NEXTCLOUD_MEMORY_LIMIT', 'nextcloud_memory_limit', '512M');
|
||||||
set { $this->set('nextcloud_memory_limit', $value); }
|
set { $this->set('nextcloud_memory_limit', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetApacheMaxSize() : int {
|
public function getApacheMaxSize() : int {
|
||||||
$uploadLimit = (int)rtrim($this->nextcloudUploadLimit, 'G');
|
$uploadLimit = (int)rtrim($this->nextcloudUploadLimit, 'G');
|
||||||
return $uploadLimit * 1024 * 1024 * 1024;
|
return $uploadLimit * 1024 * 1024 * 1024;
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $nextcloudMaxTime {
|
public string $nextcloudMaxTime {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_MAX_TIME', 'nextcloud_max_time', '3600');
|
get => $this->getEnvironmentalVariableOrConfig('NEXTCLOUD_MAX_TIME', 'nextcloud_max_time', '3600');
|
||||||
set { $this->set('nextcloud_max_time', $value); }
|
set { $this->set('nextcloud_max_time', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $borgRetentionPolicy {
|
public string $borgRetentionPolicy {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('BORG_RETENTION_POLICY', 'borg_retention_policy', '--keep-within=7d --keep-weekly=4 --keep-monthly=6');
|
get => $this->getEnvironmentalVariableOrConfig('BORG_RETENTION_POLICY', 'borg_retention_policy', '--keep-within=7d --keep-weekly=4 --keep-monthly=6');
|
||||||
set { $this->set('borg_retention_policy', $value); }
|
set { $this->set('borg_retention_policy', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $fulltextsearchJavaOptions {
|
public string $fulltextsearchJavaOptions {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('FULLTEXTSEARCH_JAVA_OPTIONS', 'fulltextsearch_java_options', '-Xms512M -Xmx512M');
|
get => $this->getEnvironmentalVariableOrConfig('FULLTEXTSEARCH_JAVA_OPTIONS', 'fulltextsearch_java_options', '-Xms512M -Xmx512M');
|
||||||
set { $this->set('fulltextsearch_java_options', $value); }
|
set { $this->set('fulltextsearch_java_options', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $dockerSocketPath {
|
public string $dockerSocketPath {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('WATCHTOWER_DOCKER_SOCKET_PATH', 'docker_socket_path', '/var/run/docker.sock');
|
get => $this->getEnvironmentalVariableOrConfig('WATCHTOWER_DOCKER_SOCKET_PATH', 'docker_socket_path', '/var/run/docker.sock');
|
||||||
set { $this->set('docker_socket_path', $value); }
|
set { $this->set('docker_socket_path', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $trustedCacertsDir {
|
public string $trustedCacertsDir {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_TRUSTED_CACERTS_DIR', 'trusted_cacerts_dir', '');
|
get => $this->getEnvironmentalVariableOrConfig('NEXTCLOUD_TRUSTED_CACERTS_DIR', 'trusted_cacerts_dir', '');
|
||||||
set { $this->set('trusted_cacerts_dir', $value); }
|
set { $this->set('trusted_cacerts_dir', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $nextcloudAdditionalApks {
|
public string $nextcloudAdditionalApks {
|
||||||
get => trim($this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_ADDITIONAL_APKS', 'nextcloud_additional_apks', 'imagemagick'));
|
get => trim($this->getEnvironmentalVariableOrConfig('NEXTCLOUD_ADDITIONAL_APKS', 'nextcloud_additional_apks', 'imagemagick'));
|
||||||
set { $this->set('nextcloud_addtional_apks', $value); }
|
set { $this->set('nextcloud_addtional_apks', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $nextcloudAdditionalPhpExtensions {
|
public string $nextcloudAdditionalPhpExtensions {
|
||||||
get => trim($this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS', 'nextcloud_additional_php_extensions', 'imagick'));
|
get => trim($this->getEnvironmentalVariableOrConfig('NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS', 'nextcloud_additional_php_extensions', 'imagick'));
|
||||||
set { $this->set('nextcloud_additional_php_extensions', $value); }
|
set { $this->set('nextcloud_additional_php_extensions', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool $collaboraSeccompDisabled {
|
public bool $collaboraSeccompDisabled {
|
||||||
get => $this->booleanize($this->GetEnvironmentalVariableOrConfig('COLLABORA_SECCOMP_DISABLED', 'collabora_seccomp_disabled', ''));
|
get => $this->booleanize($this->getEnvironmentalVariableOrConfig('COLLABORA_SECCOMP_DISABLED', 'collabora_seccomp_disabled', ''));
|
||||||
set { $this->set('collabora_seccomp_disabled', $value); }
|
set { $this->set('collabora_seccomp_disabled', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public string $apacheAdditionalNetwork {
|
public string $apacheAdditionalNetwork {
|
||||||
get => $this->GetEnvironmentalVariableOrConfig('APACHE_ADDITIONAL_NETWORK', 'apache_additional_network', '');
|
get => $this->getEnvironmentalVariableOrConfig('APACHE_ADDITIONAL_NETWORK', 'apache_additional_network', '');
|
||||||
set { $this->set('apache_additional_network', $value); }
|
set { $this->set('apache_additional_network', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool $disableBackupSection {
|
public bool $disableBackupSection {
|
||||||
get => $this->booleanize($this->GetEnvironmentalVariableOrConfig('AIO_DISABLE_BACKUP_SECTION', 'disable_backup_section', ''));
|
get => $this->booleanize($this->getEnvironmentalVariableOrConfig('AIO_DISABLE_BACKUP_SECTION', 'disable_backup_section', ''));
|
||||||
set { $this->set('disable_backup_section', $value); }
|
set { $this->set('disable_backup_section', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool $nextcloudEnableDriDevice{
|
public bool $nextcloudEnableDriDevice{
|
||||||
get => $this->booleanize($this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_ENABLE_DRI_DEVICE', 'nextcloud_enable_dri_device', ''));
|
get => $this->booleanize($this->getEnvironmentalVariableOrConfig('NEXTCLOUD_ENABLE_DRI_DEVICE', 'nextcloud_enable_dri_device', ''));
|
||||||
set { $this->set('nextcloud_enable_dri_device', $value); }
|
set { $this->set('nextcloud_enable_dri_device', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool $enableNvidiaGpu {
|
public bool $enableNvidiaGpu {
|
||||||
get => $this->booleanize($this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_ENABLE_NVIDIA_GPU', 'enable_nvidia_gpu', ''));
|
get => $this->booleanize($this->getEnvironmentalVariableOrConfig('NEXTCLOUD_ENABLE_NVIDIA_GPU', 'enable_nvidia_gpu', ''));
|
||||||
set { $this->set('enable_nvidia_gpu', $value); }
|
set { $this->set('enable_nvidia_gpu', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public bool $nextcloudKeepDisabledApps {
|
public bool $nextcloudKeepDisabledApps {
|
||||||
get => $this->booleanize($this->GetEnvironmentalVariableOrConfig('NEXTCLOUD_KEEP_DISABLED_APPS', 'nextcloud_keep_disabled_apps', ''));
|
get => $this->booleanize($this->getEnvironmentalVariableOrConfig('NEXTCLOUD_KEEP_DISABLED_APPS', 'nextcloud_keep_disabled_apps', ''));
|
||||||
set { $this->set('nextcloud_keep_disabled_apps', $value); }
|
set { $this->set('nextcloud_keep_disabled_apps', $value); }
|
||||||
}
|
}
|
||||||
|
|
||||||
private function GetConfig() : array
|
private function getConfig() : array
|
||||||
{
|
{
|
||||||
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
|
if ($this->config === [] && file_exists(DataConst::GetConfigFile()))
|
||||||
{
|
{
|
||||||
|
|
@ -300,15 +300,15 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
private function get(string $key, mixed $fallbackValue = null) : mixed {
|
private function get(string $key, mixed $fallbackValue = null) : mixed {
|
||||||
return $this->GetConfig()[$key] ?? $fallbackValue;
|
return $this->getConfig()[$key] ?? $fallbackValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function set(string $key, mixed $value) : void {
|
private function set(string $key, mixed $value) : void {
|
||||||
$this->GetConfig();
|
$this->getConfig();
|
||||||
$this->config[$key] = $value;
|
$this->config[$key] = $value;
|
||||||
// Only write if this isn't called in between startTransaction() and commitTransaction().
|
// Only write if this isn't called in between startTransaction() and commitTransaction().
|
||||||
if ($this->noWrite !== true) {
|
if ($this->noWrite !== true) {
|
||||||
$this->WriteConfig();
|
$this->writeConfig();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -317,7 +317,7 @@ class ConfigurationManager
|
||||||
* followed by a call to commitTransaction(), which then writes all changes to disk.
|
* followed by a call to commitTransaction(), which then writes all changes to disk.
|
||||||
*/
|
*/
|
||||||
public function startTransaction() : void {
|
public function startTransaction() : void {
|
||||||
$this->GetConfig();
|
$this->getConfig();
|
||||||
$this->noWrite = true;
|
$this->noWrite = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -326,13 +326,13 @@ class ConfigurationManager
|
||||||
*/
|
*/
|
||||||
public function commitTransaction() : void {
|
public function commitTransaction() : void {
|
||||||
try {
|
try {
|
||||||
$this->WriteConfig();
|
$this->writeConfig();
|
||||||
} finally {
|
} finally {
|
||||||
$this->noWrite = false;
|
$this->noWrite = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetAndGenerateSecret(string $secretId) : string {
|
public function getAndGenerateSecret(string $secretId) : string {
|
||||||
if ($secretId === '') {
|
if ($secretId === '') {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
@ -344,24 +344,24 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($secretId === 'BORGBACKUP_PASSWORD' && !file_exists(DataConst::GetBackupSecretFile())) {
|
if ($secretId === 'BORGBACKUP_PASSWORD' && !file_exists(DataConst::GetBackupSecretFile())) {
|
||||||
$this->DoubleSafeBackupSecret($secrets[$secretId]);
|
$this->doubleSafeBackupSecret($secrets[$secretId]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $secrets[$secretId];
|
return $secrets[$secretId];
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetRegisteredSecret(string $secretId) : string {
|
public function getRegisteredSecret(string $secretId) : string {
|
||||||
if ($this->secrets[$secretId]) {
|
if ($this->secrets[$secretId]) {
|
||||||
return $this->GetAndGenerateSecret($secretId);
|
return $this->getAndGenerateSecret($secretId);
|
||||||
}
|
}
|
||||||
throw new \Exception("The secret " . $secretId . " was not registered. Please check if it is defined in secrets of containers.json.");
|
throw new \Exception("The secret " . $secretId . " was not registered. Please check if it is defined in secrets of containers.json.");
|
||||||
}
|
}
|
||||||
|
|
||||||
public function RegisterSecret(string $secretId) : void {
|
public function registerSecret(string $secretId) : void {
|
||||||
$this->secrets[$secretId] = true;
|
$this->secrets[$secretId] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function DoubleSafeBackupSecret(string $borgBackupPassword) : void {
|
private function doubleSafeBackupSecret(string $borgBackupPassword) : void {
|
||||||
file_put_contents(DataConst::GetBackupSecretFile(), $borgBackupPassword);
|
file_put_contents(DataConst::GetBackupSecretFile(), $borgBackupPassword);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -373,7 +373,7 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetLastBackupTime() : string {
|
public function getLastBackupTime() : string {
|
||||||
if (!file_exists(DataConst::GetBackupArchivesList())) {
|
if (!file_exists(DataConst::GetBackupArchivesList())) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
@ -398,7 +398,7 @@ class ConfigurationManager
|
||||||
return $lastBackupTime;
|
return $lastBackupTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetBackupTimes() : array {
|
public function getBackupTimes() : array {
|
||||||
if (!file_exists(DataConst::GetBackupArchivesList())) {
|
if (!file_exists(DataConst::GetBackupArchivesList())) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
@ -441,7 +441,7 @@ class ConfigurationManager
|
||||||
*
|
*
|
||||||
* We can't turn this into a private validation method because of the second argument.
|
* We can't turn this into a private validation method because of the second argument.
|
||||||
*/
|
*/
|
||||||
public function SetDomain(string $domain, bool $skipDomainValidation) : void {
|
public function setDomain(string $domain, bool $skipDomainValidation) : void {
|
||||||
// Validate that at least one dot is contained
|
// Validate that at least one dot is contained
|
||||||
if (!str_contains($domain, '.')) {
|
if (!str_contains($domain, '.')) {
|
||||||
throw new InvalidSettingConfigurationException("Domain must contain at least one dot!");
|
throw new InvalidSettingConfigurationException("Domain must contain at least one dot!");
|
||||||
|
|
@ -508,7 +508,7 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get Instance ID
|
// Get Instance ID
|
||||||
$instanceID = $this->GetAndGenerateSecret('INSTANCE_ID');
|
$instanceID = $this->getAndGenerateSecret('INSTANCE_ID');
|
||||||
|
|
||||||
// set protocol
|
// set protocol
|
||||||
if ($port !== '443') {
|
if ($port !== '443') {
|
||||||
|
|
@ -555,7 +555,7 @@ class ConfigurationManager
|
||||||
$this->commitTransaction();
|
$this->commitTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetBaseDN() : string {
|
public function getBaseDN() : string {
|
||||||
$domain = $this->domain;
|
$domain = $this->domain;
|
||||||
if ($domain === "") {
|
if ($domain === "") {
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -566,15 +566,15 @@ class ConfigurationManager
|
||||||
/**
|
/**
|
||||||
* @throws InvalidSettingConfigurationException
|
* @throws InvalidSettingConfigurationException
|
||||||
*/
|
*/
|
||||||
public function SetBorgLocationVars(string $location, string $repo) : void {
|
public function setBorgLocationVars(string $location, string $repo) : void {
|
||||||
$this->ValidateBorgLocationVars($location, $repo);
|
$this->validateBorgLocationVars($location, $repo);
|
||||||
$this->startTransaction();
|
$this->startTransaction();
|
||||||
$this->borgBackupHostLocation = $location;
|
$this->borgBackupHostLocation = $location;
|
||||||
$this->borgRemoteRepo = $repo;
|
$this->borgRemoteRepo = $repo;
|
||||||
$this->commitTransaction();
|
$this->commitTransaction();
|
||||||
}
|
}
|
||||||
|
|
||||||
private function ValidateBorgLocationVars(string $location, string $repo) : void {
|
private function validateBorgLocationVars(string $location, string $repo) : void {
|
||||||
if ($location === '' && $repo === '') {
|
if ($location === '' && $repo === '') {
|
||||||
throw new InvalidSettingConfigurationException("Please enter a path or a remote repo url!");
|
throw new InvalidSettingConfigurationException("Please enter a path or a remote repo url!");
|
||||||
} elseif ($location !== '' && $repo !== '') {
|
} elseif ($location !== '' && $repo !== '') {
|
||||||
|
|
@ -600,11 +600,11 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$this->ValidateBorgRemoteRepo($repo);
|
$this->validateBorgRemoteRepo($repo);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private function ValidateBorgRemoteRepo(string $repo) : void {
|
private function validateBorgRemoteRepo(string $repo) : void {
|
||||||
$commonMsg = "For valid urls, see the remote examples at https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls";
|
$commonMsg = "For valid urls, see the remote examples at https://borgbackup.readthedocs.io/en/stable/usage/general.html#repository-urls";
|
||||||
if ($repo === "") {
|
if ($repo === "") {
|
||||||
// Ok, remote repo is optional
|
// Ok, remote repo is optional
|
||||||
|
|
@ -615,7 +615,7 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function DeleteBorgBackupLocationItems() : void {
|
public function deleteBorgBackupLocationItems() : void {
|
||||||
// Delete the variables
|
// Delete the variables
|
||||||
$this->startTransaction();
|
$this->startTransaction();
|
||||||
$this->borgBackupHostLocation = '';
|
$this->borgBackupHostLocation = '';
|
||||||
|
|
@ -633,8 +633,8 @@ class ConfigurationManager
|
||||||
/**
|
/**
|
||||||
* @throws InvalidSettingConfigurationException
|
* @throws InvalidSettingConfigurationException
|
||||||
*/
|
*/
|
||||||
public function SetBorgRestoreLocationVarsAndPassword(string $location, string $repo, string $password) : void {
|
public function setBorgRestoreLocationVarsAndPassword(string $location, string $repo, string $password) : void {
|
||||||
$this->ValidateBorgLocationVars($location, $repo);
|
$this->validateBorgLocationVars($location, $repo);
|
||||||
|
|
||||||
if ($password === '') {
|
if ($password === '') {
|
||||||
throw new InvalidSettingConfigurationException("Please enter the password!");
|
throw new InvalidSettingConfigurationException("Please enter the password!");
|
||||||
|
|
@ -651,7 +651,7 @@ class ConfigurationManager
|
||||||
/**
|
/**
|
||||||
* @throws InvalidSettingConfigurationException
|
* @throws InvalidSettingConfigurationException
|
||||||
*/
|
*/
|
||||||
public function ChangeMasterPassword(string $currentPassword, string $newPassword) : void {
|
public function changeMasterPassword(string $currentPassword, string $newPassword) : void {
|
||||||
if ($currentPassword === '') {
|
if ($currentPassword === '') {
|
||||||
throw new InvalidSettingConfigurationException("Please enter your current password.");
|
throw new InvalidSettingConfigurationException("Please enter your current password.");
|
||||||
}
|
}
|
||||||
|
|
@ -679,7 +679,7 @@ class ConfigurationManager
|
||||||
/**
|
/**
|
||||||
* @throws InvalidSettingConfigurationException
|
* @throws InvalidSettingConfigurationException
|
||||||
*/
|
*/
|
||||||
private function WriteConfig() : void {
|
private function writeConfig() : void {
|
||||||
if(!is_dir(DataConst::GetDataDirectory())) {
|
if(!is_dir(DataConst::GetDataDirectory())) {
|
||||||
throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not exist! Something was set up falsely!");
|
throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not exist! Something was set up falsely!");
|
||||||
}
|
}
|
||||||
|
|
@ -697,7 +697,7 @@ class ConfigurationManager
|
||||||
$this->config = [];
|
$this->config = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
private function GetEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string {
|
private function getEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string {
|
||||||
$envVariableOutput = getenv($envVariableName);
|
$envVariableOutput = getenv($envVariableName);
|
||||||
$configValue = $this->get($configName, '');
|
$configValue = $this->get($configName, '');
|
||||||
if ($envVariableOutput === false) {
|
if ($envVariableOutput === false) {
|
||||||
|
|
@ -716,7 +716,7 @@ class ConfigurationManager
|
||||||
return $envVariableOutput;
|
return $envVariableOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetBorgPublicKey() : string {
|
public function getBorgPublicKey() : string {
|
||||||
if (!file_exists(DataConst::GetBackupPublicKey())) {
|
if (!file_exists(DataConst::GetBackupPublicKey())) {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
@ -724,7 +724,7 @@ class ConfigurationManager
|
||||||
return trim((string)file_get_contents(DataConst::GetBackupPublicKey()));
|
return trim((string)file_get_contents(DataConst::GetBackupPublicKey()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetCollaboraSeccompPolicy() : string {
|
public function getCollaboraSeccompPolicy() : string {
|
||||||
$defaultString = '--o:security.seccomp=';
|
$defaultString = '--o:security.seccomp=';
|
||||||
if (!$this->collaboraSeccompDisabled) {
|
if (!$this->collaboraSeccompDisabled) {
|
||||||
return $defaultString . 'true';
|
return $defaultString . 'true';
|
||||||
|
|
@ -735,7 +735,7 @@ class ConfigurationManager
|
||||||
/**
|
/**
|
||||||
* @throws InvalidSettingConfigurationException
|
* @throws InvalidSettingConfigurationException
|
||||||
*/
|
*/
|
||||||
public function SetDailyBackupTime(string $time, bool $enableAutomaticUpdates, bool $successNotification) : void {
|
public function setDailyBackupTime(string $time, bool $enableAutomaticUpdates, bool $successNotification) : void {
|
||||||
if ($time === "") {
|
if ($time === "") {
|
||||||
throw new InvalidSettingConfigurationException("The daily backup time must not be empty!");
|
throw new InvalidSettingConfigurationException("The daily backup time must not be empty!");
|
||||||
}
|
}
|
||||||
|
|
@ -757,7 +757,7 @@ class ConfigurationManager
|
||||||
file_put_contents(DataConst::GetDailyBackupTimeFile(), $time);
|
file_put_contents(DataConst::GetDailyBackupTimeFile(), $time);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetDailyBackupTime() : string {
|
public function getDailyBackupTime() : string {
|
||||||
if (!file_exists(DataConst::GetDailyBackupTimeFile())) {
|
if (!file_exists(DataConst::GetDailyBackupTimeFile())) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
@ -779,7 +779,7 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function DeleteDailyBackupTime() : void {
|
public function deleteDailyBackupTime() : void {
|
||||||
if (file_exists(DataConst::GetDailyBackupTimeFile())) {
|
if (file_exists(DataConst::GetDailyBackupTimeFile())) {
|
||||||
unlink(DataConst::GetDailyBackupTimeFile());
|
unlink(DataConst::GetDailyBackupTimeFile());
|
||||||
}
|
}
|
||||||
|
|
@ -788,7 +788,7 @@ class ConfigurationManager
|
||||||
/**
|
/**
|
||||||
* @throws InvalidSettingConfigurationException
|
* @throws InvalidSettingConfigurationException
|
||||||
*/
|
*/
|
||||||
public function SetAdditionalBackupDirectories(string $additionalBackupDirectories) : void {
|
public function setAdditionalBackupDirectories(string $additionalBackupDirectories) : void {
|
||||||
$additionalBackupDirectoriesArray = explode("\n", $additionalBackupDirectories);
|
$additionalBackupDirectoriesArray = explode("\n", $additionalBackupDirectories);
|
||||||
$validDirectories = '';
|
$validDirectories = '';
|
||||||
foreach($additionalBackupDirectoriesArray as $entry) {
|
foreach($additionalBackupDirectoriesArray as $entry) {
|
||||||
|
|
@ -809,15 +809,15 @@ class ConfigurationManager
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetAdditionalBackupDirectoriesString() : string {
|
public function getAdditionalBackupDirectoriesString() : string {
|
||||||
if (!file_exists(DataConst::GetAdditionalBackupDirectoriesFile())) {
|
if (!file_exists(DataConst::GetAdditionalBackupDirectoriesFile())) {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
return (string)file_get_contents(DataConst::GetAdditionalBackupDirectoriesFile());
|
return (string)file_get_contents(DataConst::GetAdditionalBackupDirectoriesFile());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetAdditionalBackupDirectoriesArray() : array {
|
public function getAdditionalBackupDirectoriesArray() : array {
|
||||||
$additionalBackupDirectories = $this->GetAdditionalBackupDirectoriesString();
|
$additionalBackupDirectories = $this->getAdditionalBackupDirectoriesString();
|
||||||
$additionalBackupDirectoriesArray = explode("\n", $additionalBackupDirectories);
|
$additionalBackupDirectoriesArray = explode("\n", $additionalBackupDirectories);
|
||||||
$additionalBackupDirectoriesArray = array_unique($additionalBackupDirectoriesArray, SORT_REGULAR);
|
$additionalBackupDirectoriesArray = array_unique($additionalBackupDirectoriesArray, SORT_REGULAR);
|
||||||
return $additionalBackupDirectoriesArray;
|
return $additionalBackupDirectoriesArray;
|
||||||
|
|
@ -854,7 +854,7 @@ class ConfigurationManager
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetNextcloudStartupApps() : string {
|
public function getNextcloudStartupApps() : string {
|
||||||
$apps = getenv('NEXTCLOUD_STARTUP_APPS');
|
$apps = getenv('NEXTCLOUD_STARTUP_APPS');
|
||||||
if (is_string($apps)) {
|
if (is_string($apps)) {
|
||||||
return trim($apps);
|
return trim($apps);
|
||||||
|
|
@ -878,7 +878,7 @@ class ConfigurationManager
|
||||||
/**
|
/**
|
||||||
* Provide an extra method since the corresponding attribute setter prevents setting an empty value.
|
* Provide an extra method since the corresponding attribute setter prevents setting an empty value.
|
||||||
*/
|
*/
|
||||||
public function DeleteCollaboraDictionaries() : void {
|
public function deleteCollaboraDictionaries() : void {
|
||||||
$this->set('collabora_dictionaries', '');
|
$this->set('collabora_dictionaries', '');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1007,7 +1007,7 @@ class ConfigurationManager
|
||||||
private function getPlaceholderValue(string $placeholder) : string {
|
private function getPlaceholderValue(string $placeholder) : string {
|
||||||
return match ($placeholder) {
|
return match ($placeholder) {
|
||||||
'NC_DOMAIN' => $this->domain,
|
'NC_DOMAIN' => $this->domain,
|
||||||
'NC_BASE_DN' => $this->GetBaseDN(),
|
'NC_BASE_DN' => $this->getBaseDN(),
|
||||||
'AIO_TOKEN' => $this->aioToken,
|
'AIO_TOKEN' => $this->aioToken,
|
||||||
'BORGBACKUP_REMOTE_REPO' => $this->borgRemoteRepo,
|
'BORGBACKUP_REMOTE_REPO' => $this->borgRemoteRepo,
|
||||||
'BORGBACKUP_MODE' => $this->backupMode,
|
'BORGBACKUP_MODE' => $this->backupMode,
|
||||||
|
|
@ -1037,11 +1037,11 @@ class ConfigurationManager
|
||||||
'BORG_RETENTION_POLICY' => $this->borgRetentionPolicy,
|
'BORG_RETENTION_POLICY' => $this->borgRetentionPolicy,
|
||||||
'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->fulltextsearchJavaOptions,
|
'FULLTEXTSEARCH_JAVA_OPTIONS' => $this->fulltextsearchJavaOptions,
|
||||||
'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->trustedCacertsDir,
|
'NEXTCLOUD_TRUSTED_CACERTS_DIR' => $this->trustedCacertsDir,
|
||||||
'ADDITIONAL_DIRECTORIES_BACKUP' => $this->GetAdditionalBackupDirectoriesString() !== '' ? 'yes' : '',
|
'ADDITIONAL_DIRECTORIES_BACKUP' => $this->getAdditionalBackupDirectoriesString() !== '' ? 'yes' : '',
|
||||||
'BORGBACKUP_HOST_LOCATION' => $this->borgBackupHostLocation,
|
'BORGBACKUP_HOST_LOCATION' => $this->borgBackupHostLocation,
|
||||||
'APACHE_MAX_SIZE' => (string)($this->GetApacheMaxSize()),
|
'APACHE_MAX_SIZE' => (string)($this->getApacheMaxSize()),
|
||||||
'COLLABORA_SECCOMP_POLICY' => $this->GetCollaboraSeccompPolicy(),
|
'COLLABORA_SECCOMP_POLICY' => $this->getCollaboraSeccompPolicy(),
|
||||||
'NEXTCLOUD_STARTUP_APPS' => $this->GetNextcloudStartupApps(),
|
'NEXTCLOUD_STARTUP_APPS' => $this->getNextcloudStartupApps(),
|
||||||
'NEXTCLOUD_ADDITIONAL_APKS' => $this->nextcloudAdditionalApks,
|
'NEXTCLOUD_ADDITIONAL_APKS' => $this->nextcloudAdditionalApks,
|
||||||
'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->nextcloudAdditionalPhpExtensions,
|
'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->nextcloudAdditionalPhpExtensions,
|
||||||
'INSTALL_LATEST_MAJOR' => $this->installLatestMajor ? 'yes' : '',
|
'INSTALL_LATEST_MAJOR' => $this->installLatestMajor ? 'yes' : '',
|
||||||
|
|
@ -1052,7 +1052,7 @@ class ConfigurationManager
|
||||||
'CADDY_IP_ADDRESS' => in_array('caddy', $this->aioCommunityContainers, true) ? gethostbyname('nextcloud-aio-caddy') : '',
|
'CADDY_IP_ADDRESS' => in_array('caddy', $this->aioCommunityContainers, true) ? gethostbyname('nextcloud-aio-caddy') : '',
|
||||||
'WHITEBOARD_ENABLED' => $this->isWhiteboardEnabled ? 'yes' : '',
|
'WHITEBOARD_ENABLED' => $this->isWhiteboardEnabled ? 'yes' : '',
|
||||||
'AIO_VERSION' => $this->getAioVersion(),
|
'AIO_VERSION' => $this->getAioVersion(),
|
||||||
default => $this->GetRegisteredSecret($placeholder),
|
default => $this->getRegisteredSecret($placeholder),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ readonly class DockerActionManager {
|
||||||
// Make volumes read only in case of borgbackup container. The viewer makes them writeable
|
// Make volumes read only in case of borgbackup container. The viewer makes them writeable
|
||||||
$isReadOnly = $container->identifier === 'nextcloud-aio-borgbackup';
|
$isReadOnly = $container->identifier === 'nextcloud-aio-borgbackup';
|
||||||
|
|
||||||
foreach ($this->configurationManager->GetAdditionalBackupDirectoriesArray() as $additionalBackupDirectories) {
|
foreach ($this->configurationManager->getAdditionalBackupDirectoriesArray() as $additionalBackupDirectories) {
|
||||||
if ($additionalBackupDirectories !== '') {
|
if ($additionalBackupDirectories !== '') {
|
||||||
if (!str_starts_with($additionalBackupDirectories, '/')) {
|
if (!str_starts_with($additionalBackupDirectories, '/')) {
|
||||||
$mounts[] = ["Type" => "volume", "Source" => $additionalBackupDirectories, "Target" => "/docker_volumes/" . $additionalBackupDirectories, "ReadOnly" => $isReadOnly];
|
$mounts[] = ["Type" => "volume", "Source" => $additionalBackupDirectories, "Target" => "/docker_volumes/" . $additionalBackupDirectories, "ReadOnly" => $isReadOnly];
|
||||||
|
|
@ -940,7 +940,7 @@ readonly class DockerActionManager {
|
||||||
}
|
}
|
||||||
|
|
||||||
public function GetAndGenerateSecretWrapper(string $secretId): string {
|
public function GetAndGenerateSecretWrapper(string $secretId): string {
|
||||||
return $this->configurationManager->GetAndGenerateSecret($secretId);
|
return $this->configurationManager->getAndGenerateSecret($secretId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function isNextcloudImageOutdated(): bool {
|
public function isNextcloudImageOutdated(): bool {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue