2021-11-30 11:20:42 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace AIO\Data;
|
|
|
|
|
|
|
|
|
|
use AIO\Auth\PasswordGenerator;
|
|
|
|
|
use AIO\Controller\DockerController;
|
|
|
|
|
|
|
|
|
|
class ConfigurationManager
|
|
|
|
|
{
|
|
|
|
|
public function GetConfig() : array
|
|
|
|
|
{
|
|
|
|
|
if(file_exists(DataConst::GetConfigFile()))
|
|
|
|
|
{
|
|
|
|
|
$configContent = file_get_contents(DataConst::GetConfigFile());
|
|
|
|
|
return json_decode($configContent, true);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return [];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function GetPassword() : string {
|
|
|
|
|
return $this->GetConfig()['password'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function GetToken() : string {
|
|
|
|
|
return $this->GetConfig()['AIO_TOKEN'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function SetPassword(string $password) : void {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['password'] = $password;
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function GetSecret(string $secretId) : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['secrets'][$secretId])) {
|
|
|
|
|
$config['secrets'][$secretId] = bin2hex(random_bytes(24));
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($secretId === 'BORGBACKUP_PASSWORD' && !file_exists(DataConst::GetBackupSecretFile())) {
|
|
|
|
|
$this->DoubleSafeBackupSecret($config['secrets'][$secretId]);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['secrets'][$secretId];
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-01 11:44:59 +01:00
|
|
|
private function DoubleSafeBackupSecret(string $borgBackupPassword) : void {
|
2021-11-30 11:20:42 +01:00
|
|
|
file_put_contents(DataConst::GetBackupSecretFile(), $borgBackupPassword);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function hasBackupRunOnce() : bool {
|
|
|
|
|
if (!file_exists(DataConst::GetBackupKeyFile())) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function GetLastBackupTime() : string {
|
|
|
|
|
if (!file_exists(DataConst::GetBackupArchivesList())) {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$content = file_get_contents(DataConst::GetBackupArchivesList());
|
2022-02-16 15:05:04 +01:00
|
|
|
if ($content === '') {
|
2021-11-30 11:20:42 +01:00
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$lastBackupLines = explode("\n", $content);
|
|
|
|
|
$lastBackupLine = $lastBackupLines[sizeof($lastBackupLines) - 2];
|
|
|
|
|
if ($lastBackupLine === "") {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$lastBackupTimes = explode(",", $lastBackupLine);
|
|
|
|
|
$lastBackupTime = $lastBackupTimes[1];
|
|
|
|
|
if ($lastBackupTime === "") {
|
|
|
|
|
return '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $lastBackupTime;
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-07 19:10:05 +01:00
|
|
|
public function GetBackupTimes() : array {
|
|
|
|
|
if (!file_exists(DataConst::GetBackupArchivesList())) {
|
2022-02-16 15:05:04 +01:00
|
|
|
return [];
|
2021-12-07 19:10:05 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$content = file_get_contents(DataConst::GetBackupArchivesList());
|
2022-02-16 15:05:04 +01:00
|
|
|
if ($content === '') {
|
|
|
|
|
return [];
|
2021-12-07 19:10:05 +01:00
|
|
|
}
|
|
|
|
|
|
2022-02-16 15:05:04 +01:00
|
|
|
$backupLines = explode("\n", $content);
|
2022-02-16 14:32:57 +01:00
|
|
|
$backupTimes = [];
|
2021-12-07 19:10:05 +01:00
|
|
|
foreach($backupLines as $lines) {
|
2022-02-16 15:05:04 +01:00
|
|
|
if ($lines !== "") {
|
|
|
|
|
$backupTimesTemp = explode(',', $lines);
|
|
|
|
|
$backupTimes[] = $backupTimesTemp[1];
|
|
|
|
|
}
|
2021-12-07 19:10:05 +01:00
|
|
|
}
|
|
|
|
|
|
2022-03-15 16:02:43 +01:00
|
|
|
// Reverse the array to list newest backup first
|
|
|
|
|
$backupTimes = array_reverse($backupTimes);
|
|
|
|
|
|
2021-12-07 19:10:05 +01:00
|
|
|
return $backupTimes;
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-30 11:20:42 +01:00
|
|
|
public function wasStartButtonClicked() : bool {
|
|
|
|
|
if (isset($this->GetConfig()['wasStartButtonClicked'])) {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-15 23:46:58 +01:00
|
|
|
public function isx64Platform() : bool {
|
|
|
|
|
if (php_uname('m') === 'x86_64') {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function isClamavEnabled() : bool {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if (isset($config['isClamavEnabled']) && $config['isClamavEnabled'] === 1) {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function SetClamavEnabledState(int $value) : void {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['isClamavEnabled'] = $value;
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-17 10:13:21 +01:00
|
|
|
public function isOnlyofficeEnabled() : bool {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if (isset($config['isOnlyofficeEnabled']) && $config['isOnlyofficeEnabled'] === 1) {
|
|
|
|
|
return true;
|
|
|
|
|
} else {
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function SetOnlyofficeEnabledState(int $value) : void {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['isOnlyofficeEnabled'] = $value;
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function isCollaboraEnabled() : bool {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if (isset($config['isCollaboraEnabled']) && $config['isCollaboraEnabled'] === 0) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function SetCollaboraEnabledState(int $value) : void {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['isCollaboraEnabled'] = $value;
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function isTalkEnabled() : bool {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if (isset($config['isTalkEnabled']) && $config['isTalkEnabled'] === 0) {
|
|
|
|
|
return false;
|
|
|
|
|
} else {
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function SetTalkEnabledState(int $value) : void {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['isTalkEnabled'] = $value;
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-30 11:20:42 +01:00
|
|
|
/**
|
|
|
|
|
* @throws InvalidSettingConfigurationException
|
|
|
|
|
*/
|
|
|
|
|
public function SetDomain(string $domain) : void {
|
2022-03-09 11:59:44 +01:00
|
|
|
// Validate domain
|
|
|
|
|
if (!filter_var($domain, FILTER_VALIDATE_DOMAIN, FILTER_FLAG_HOSTNAME)) {
|
2021-11-30 11:20:42 +01:00
|
|
|
throw new InvalidSettingConfigurationException("Domain is not in a valid format!");
|
|
|
|
|
}
|
|
|
|
|
|
2022-02-23 18:01:56 +01:00
|
|
|
// Validate that it is not an IP-address
|
|
|
|
|
if(filter_var($domain, FILTER_VALIDATE_IP)) {
|
|
|
|
|
throw new InvalidSettingConfigurationException("Please enter a domain and not an IP-address!");
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-30 11:20:42 +01:00
|
|
|
$dnsRecordIP = gethostbyname($domain);
|
|
|
|
|
|
|
|
|
|
// Validate IP
|
|
|
|
|
if(!filter_var($dnsRecordIP, FILTER_VALIDATE_IP)) {
|
|
|
|
|
throw new InvalidSettingConfigurationException("DNS config is not set or domain is not in a valid format!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$connection = @fsockopen($domain, 443, $errno, $errstr, 0.1);
|
|
|
|
|
if ($connection) {
|
|
|
|
|
fclose($connection);
|
|
|
|
|
} else {
|
|
|
|
|
throw new InvalidSettingConfigurationException("The server is not reachable on Port 443.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Get Instance ID
|
|
|
|
|
$instanceID = $this->GetSecret('INSTANCE_ID');
|
|
|
|
|
|
2021-12-08 18:12:56 +01:00
|
|
|
// set protocol
|
|
|
|
|
$port = $this->GetApachePort();
|
|
|
|
|
if ($port !== '443') {
|
|
|
|
|
$protocol = 'https://';
|
|
|
|
|
} else {
|
|
|
|
|
$protocol = 'http://';
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-30 11:20:42 +01:00
|
|
|
$ch = curl_init();
|
2021-12-08 18:12:56 +01:00
|
|
|
curl_setopt($ch, CURLOPT_URL, $protocol . $domain . ':443');
|
2021-11-30 11:20:42 +01:00
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
2022-02-28 16:25:23 +00:00
|
|
|
$response = (string)curl_exec($ch);
|
2021-11-30 11:20:42 +01:00
|
|
|
# Get rid of trailing \n
|
|
|
|
|
$response = str_replace("\n", "", $response);
|
|
|
|
|
|
|
|
|
|
if($response !== $instanceID) {
|
2022-03-09 11:59:44 +01:00
|
|
|
throw new InvalidSettingConfigurationException("Domain does not point to this server or reverse proxy not configured correctly.");
|
2021-11-30 11:20:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Write domain
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['domain'] = $domain;
|
2022-03-21 13:23:17 +01:00
|
|
|
// Reset the borg restore password when setting the domain
|
|
|
|
|
$config['borg_restore_password'] = '';
|
2021-11-30 11:20:42 +01:00
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function GetDomain() : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['domain'])) {
|
|
|
|
|
$config['domain'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['domain'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function GetBackupMode() : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['backup-mode'])) {
|
|
|
|
|
$config['backup-mode'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['backup-mode'];
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-07 19:10:05 +01:00
|
|
|
public function GetSelectedRestoreTime() : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['selected-restore-time'])) {
|
|
|
|
|
$config['selected-restore-time'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['selected-restore-time'];
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-30 11:20:42 +01:00
|
|
|
public function GetAIOURL() : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['AIO_URL'])) {
|
|
|
|
|
$config['AIO_URL'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['AIO_URL'];
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @throws InvalidSettingConfigurationException
|
|
|
|
|
*/
|
|
|
|
|
public function SetBorgBackupHostLocation(string $location) : void {
|
|
|
|
|
$allowedPrefixes = [
|
|
|
|
|
'/mnt/',
|
|
|
|
|
'/media/',
|
2022-03-18 11:00:17 +01:00
|
|
|
'/host_mnt/',
|
2021-11-30 11:20:42 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
|
|
$isValidPath = false;
|
|
|
|
|
foreach($allowedPrefixes as $allowedPrefix) {
|
2022-01-14 18:23:13 +01:00
|
|
|
if(str_starts_with($location, $allowedPrefix) && !str_ends_with($location, '/')) {
|
|
|
|
|
$isValidPath = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
if ($location === '/var/backups') {
|
2021-11-30 11:20:42 +01:00
|
|
|
$isValidPath = true;
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!$isValidPath) {
|
2022-03-18 11:00:17 +01:00
|
|
|
throw new InvalidSettingConfigurationException("The path must start with '/mnt/', '/media/' or '/host_mnt/' or be equal to '/var/backups'.");
|
2021-11-30 11:20:42 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['borg_backup_host_location'] = $location;
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-21 13:23:17 +01:00
|
|
|
/**
|
|
|
|
|
* @throws InvalidSettingConfigurationException
|
|
|
|
|
*/
|
|
|
|
|
public function SetBorgRestoreHostLocationAndPassword(string $location, string $password) : void {
|
|
|
|
|
if ($location === '') {
|
|
|
|
|
throw new InvalidSettingConfigurationException("Please enter a path!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$isValidPath = false;
|
|
|
|
|
if (str_starts_with($location, '/') && !str_ends_with($location, '/')) {
|
|
|
|
|
$isValidPath = true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!$isValidPath) {
|
|
|
|
|
throw new InvalidSettingConfigurationException("The path may start with '/mnt/', '/media/' or '/host_mnt/' or may be equal to '/var/backups'.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($password === '') {
|
|
|
|
|
throw new InvalidSettingConfigurationException("Please enter the password!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
$config['borg_backup_host_location'] = $location;
|
|
|
|
|
$config['borg_restore_password'] = $password;
|
|
|
|
|
$this->WriteConfig($config);
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-08 21:16:33 +01:00
|
|
|
/**
|
|
|
|
|
* @throws InvalidSettingConfigurationException
|
|
|
|
|
*/
|
|
|
|
|
public function ChangeMasterPassword(string $currentPassword, string $newPassword) : void {
|
|
|
|
|
if ($currentPassword === '') {
|
|
|
|
|
throw new InvalidSettingConfigurationException("Please enter your current password.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($currentPassword !== $this->GetPassword()) {
|
|
|
|
|
throw new InvalidSettingConfigurationException("The entered current password is not correct.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($newPassword === '') {
|
|
|
|
|
throw new InvalidSettingConfigurationException("Please enter a new password.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (strlen($newPassword) < 24) {
|
|
|
|
|
throw new InvalidSettingConfigurationException("New passwords must be >= 24 digits.");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (!preg_match("#^[a-zA-Z0-9 ]+$#", $newPassword)) {
|
|
|
|
|
throw new InvalidSettingConfigurationException('Not allowed characters in the new password.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// All checks pass so set the password
|
|
|
|
|
$this->SetPassword($newPassword);
|
|
|
|
|
}
|
|
|
|
|
|
2021-12-08 18:12:56 +01:00
|
|
|
public function GetApachePort() : string {
|
2022-03-11 17:28:55 +01:00
|
|
|
$envVariableName = 'APACHE_PORT';
|
|
|
|
|
$configName = 'apache_port';
|
|
|
|
|
$defaultValue = '443';
|
|
|
|
|
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
2021-12-08 18:12:56 +01:00
|
|
|
}
|
|
|
|
|
|
2021-12-04 11:01:38 +01:00
|
|
|
/**
|
|
|
|
|
* @throws InvalidSettingConfigurationException
|
|
|
|
|
*/
|
2021-11-30 11:20:42 +01:00
|
|
|
public function WriteConfig(array $config) : void {
|
|
|
|
|
if(!is_dir(DataConst::GetDataDirectory())) {
|
2021-12-04 11:01:38 +01:00
|
|
|
throw new InvalidSettingConfigurationException(DataConst::GetDataDirectory() . " does not exist! Something was set up falsely!");
|
2021-11-30 11:20:42 +01:00
|
|
|
}
|
|
|
|
|
file_put_contents(DataConst::GetConfigFile(), json_encode($config));
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-11 17:28:55 +01:00
|
|
|
private function GetEnvironmentalVariableOrConfig(string $envVariableName, string $configName, string $defaultValue) : string {
|
|
|
|
|
$envVariableOutput = getenv($envVariableName);
|
|
|
|
|
if ($envVariableOutput === false) {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if (!isset($config[$configName]) || $config[$configName] === '') {
|
|
|
|
|
$config[$configName] = $defaultValue;
|
|
|
|
|
}
|
|
|
|
|
return $config[$configName];
|
2022-03-14 14:59:46 +01:00
|
|
|
}
|
|
|
|
|
if(file_exists(DataConst::GetConfigFile())) {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if (!isset($config[$configName])) {
|
|
|
|
|
$config[$configName] = '';
|
|
|
|
|
}
|
|
|
|
|
if ($envVariableOutput !== $config[$configName]) {
|
|
|
|
|
$config[$configName] = $envVariableOutput;
|
|
|
|
|
$this->WriteConfig($config);
|
2022-03-11 17:28:55 +01:00
|
|
|
}
|
|
|
|
|
}
|
2022-03-14 14:59:46 +01:00
|
|
|
return $envVariableOutput;
|
2022-03-11 17:28:55 +01:00
|
|
|
}
|
|
|
|
|
|
2021-11-30 11:20:42 +01:00
|
|
|
public function GetBorgBackupHostLocation() : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['borg_backup_host_location'])) {
|
|
|
|
|
$config['borg_backup_host_location'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['borg_backup_host_location'];
|
|
|
|
|
}
|
|
|
|
|
|
2022-03-21 13:23:17 +01:00
|
|
|
public function GetBorgRestorePassword() : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['borg_restore_password'])) {
|
|
|
|
|
$config['borg_restore_password'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['borg_restore_password'];
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-30 11:20:42 +01:00
|
|
|
public function GetBorgBackupMode() : string {
|
|
|
|
|
$config = $this->GetConfig();
|
|
|
|
|
if(!isset($config['backup-mode'])) {
|
|
|
|
|
$config['backup-mode'] = '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return $config['backup-mode'];
|
|
|
|
|
}
|
2022-02-21 17:31:05 +01:00
|
|
|
|
|
|
|
|
public function GetNextcloudMount() : string {
|
2022-03-11 17:28:55 +01:00
|
|
|
$envVariableName = 'NEXTCLOUD_MOUNT';
|
|
|
|
|
$configName = 'nextcloud_mount';
|
|
|
|
|
$defaultValue = '';
|
|
|
|
|
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
2022-02-21 17:31:05 +01:00
|
|
|
}
|
2022-03-08 16:49:13 +01:00
|
|
|
|
|
|
|
|
public function GetNextcloudDatadirMount() : string {
|
2022-03-11 17:28:55 +01:00
|
|
|
$envVariableName = 'NEXTCLOUD_DATADIR';
|
|
|
|
|
$configName = 'nextcloud_datadir';
|
|
|
|
|
$defaultValue = 'nextcloud_aio_nextcloud_data';
|
|
|
|
|
return $this->GetEnvironmentalVariableOrConfig($envVariableName, $configName, $defaultValue);
|
2022-03-08 16:49:13 +01:00
|
|
|
}
|
2021-11-30 11:20:42 +01:00
|
|
|
}
|