mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-04 04:56:52 +00:00
insert the AIO version into Nextcloud's system config
Signed-off-by: Simon L. <szaimen@e.mail.de>
This commit is contained in:
parent
e9108e3660
commit
9871a3eb9a
3 changed files with 14 additions and 0 deletions
|
|
@ -219,6 +219,7 @@
|
||||||
"SIGNALING_SECRET=%SIGNALING_SECRET%",
|
"SIGNALING_SECRET=%SIGNALING_SECRET%",
|
||||||
"ONLYOFFICE_SECRET=%ONLYOFFICE_SECRET%",
|
"ONLYOFFICE_SECRET=%ONLYOFFICE_SECRET%",
|
||||||
"AIO_URL=%AIO_URL%",
|
"AIO_URL=%AIO_URL%",
|
||||||
|
"NC_AIO_VERSION=v%AIO_VERSION%",
|
||||||
"NEXTCLOUD_MOUNT=%NEXTCLOUD_MOUNT%",
|
"NEXTCLOUD_MOUNT=%NEXTCLOUD_MOUNT%",
|
||||||
"CLAMAV_ENABLED=%CLAMAV_ENABLED%",
|
"CLAMAV_ENABLED=%CLAMAV_ENABLED%",
|
||||||
"CLAMAV_HOST=nextcloud-aio-clamav",
|
"CLAMAV_HOST=nextcloud-aio-clamav",
|
||||||
|
|
|
||||||
|
|
@ -420,6 +420,14 @@ class ConfigurationManager
|
||||||
return $backupTimes;
|
return $backupTimes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getAioVersion() : string {
|
||||||
|
$path = DataConst::GetAioVersionFile();
|
||||||
|
if ($path !== '' && file_exists($path)) {
|
||||||
|
return trim((string)file_get_contents($path));
|
||||||
|
}
|
||||||
|
return '';
|
||||||
|
}
|
||||||
|
|
||||||
private function isx64Platform() : bool {
|
private function isx64Platform() : bool {
|
||||||
if (php_uname('m') === 'x86_64') {
|
if (php_uname('m') === 'x86_64') {
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -1043,6 +1051,7 @@ class ConfigurationManager
|
||||||
// Allow to get local ip-address of caddy container and add it to trusted proxies automatically
|
// Allow to get local ip-address of caddy container and add it to trusted proxies automatically
|
||||||
'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(),
|
||||||
default => $this->GetRegisteredSecret($placeholder),
|
default => $this->GetRegisteredSecret($placeholder),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -66,4 +66,8 @@ class DataConst {
|
||||||
public static function GetContainersDefinitionPath() : string {
|
public static function GetContainersDefinitionPath() : string {
|
||||||
return (string)realpath(__DIR__ . '/../../containers.json');
|
return (string)realpath(__DIR__ . '/../../containers.json');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function GetAioVersionFile() : string {
|
||||||
|
return (string)realpath(__DIR__ . '/../../templates/includes/aio-version.twig');
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue