mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
Compare commits
4 commits
fec5bbc3c4
...
f0867ccc41
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f0867ccc41 | ||
|
|
743a8221b3 | ||
|
|
eb01888a63 | ||
|
|
f7cde3fb0a |
1 changed files with 15 additions and 9 deletions
|
|
@ -259,7 +259,7 @@ class ConfigurationManager
|
|||
}
|
||||
|
||||
public bool $collaboraSeccompDisabled {
|
||||
get => 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); }
|
||||
}
|
||||
|
||||
|
|
@ -269,22 +269,22 @@ class ConfigurationManager
|
|||
}
|
||||
|
||||
public bool $disableBackupSection {
|
||||
get => 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); }
|
||||
}
|
||||
|
||||
public bool $nextcloudEnableDriDevice{
|
||||
get => 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); }
|
||||
}
|
||||
|
||||
public bool $enableNvidiaGpu {
|
||||
get => 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); }
|
||||
}
|
||||
|
||||
public bool $nextcloudKeepDisabledApps {
|
||||
get => 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); }
|
||||
}
|
||||
|
||||
|
|
@ -934,6 +934,12 @@ class ConfigurationManager
|
|||
}
|
||||
|
||||
private function camelize(string $input, string $delimiter = '_') : string {
|
||||
if ($input === '') {
|
||||
throw new InvalidSettingConfigurationException('input cannot be empty!');
|
||||
}
|
||||
if ($delimiter === '') {
|
||||
$delimiter = '_';
|
||||
}
|
||||
return lcfirst(implode("", array_map('ucfirst', explode($delimiter, strtolower($input)))));
|
||||
|
||||
}
|
||||
|
|
@ -948,17 +954,17 @@ class ConfigurationManager
|
|||
error_log("Invalid input: '$variable' is not a string or does not contain an equal sign ('=')");
|
||||
continue;
|
||||
}
|
||||
$keyWithValue = $confManager->replaceEnvPlaceholders($variable);
|
||||
$keyWithValue = $this->replaceEnvPlaceholders($variable);
|
||||
// Pad the result with nulls so psalm is happy (and we don't risk to run into warnings in case
|
||||
// the check for an equal sign from above gets changed).
|
||||
[$key, $value] = explode('=', $keyWithValue, 2) + [null, null];
|
||||
$key = $this->camelize($key);
|
||||
if ($value === null) {
|
||||
error_log("Invalid input: '$keyWithValue' has no value after the equal sign");
|
||||
} else if (!property_exists($confManager, $key)) {
|
||||
} else if (!property_exists($this, $key)) {
|
||||
error_log("Error: '$key' is not a valid configuration key (in '$keyWithValue')");
|
||||
} else {
|
||||
$confManager->$key = $value;
|
||||
$this->$key = $value;
|
||||
}
|
||||
}
|
||||
$this->commitTransaction();
|
||||
|
|
@ -1030,7 +1036,7 @@ class ConfigurationManager
|
|||
'NEXTCLOUD_STARTUP_APPS' => $this->GetNextcloudStartupApps(),
|
||||
'NEXTCLOUD_ADDITIONAL_APKS' => $this->nextcloudAdditionalApks,
|
||||
'NEXTCLOUD_ADDITIONAL_PHP_EXTENSIONS' => $this->nextcloudAdditionalPhpExtensions,
|
||||
'INSTALL_LATEST_MAJOR' => $this->installLatestMajor,
|
||||
'INSTALL_LATEST_MAJOR' => $this->installLatestMajor ? 'yes' : '',
|
||||
'REMOVE_DISABLED_APPS' => $this->nextcloudKeepDisabledApps ? '' : 'yes',
|
||||
// Allow to get local ip-address of database container which allows to talk to it even in host mode (the container that requires this needs to be started first then)
|
||||
'AIO_DATABASE_HOST' => gethostbyname('nextcloud-aio-database'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue