Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/serverinfo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2020-03-16 16:50:43 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2020-03-17 22:33:39 +0300
commit275b70bcbdde46a11d36ec793cdaa7658a0bc692 (patch)
tree395b4c46215145b0a045d956f2e15b7901db3a71 /lib
parentc4e07900090877a1e8c9baef796b3af2ab5b99a2 (diff)
Use gethostname to fetch the systems hostname
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/OperatingSystems/DefaultOs.php8
-rw-r--r--lib/Os.php3
2 files changed, 1 insertions, 10 deletions
diff --git a/lib/OperatingSystems/DefaultOs.php b/lib/OperatingSystems/DefaultOs.php
index f7d71f2..ebc6dc1 100644
--- a/lib/OperatingSystems/DefaultOs.php
+++ b/lib/OperatingSystems/DefaultOs.php
@@ -43,14 +43,6 @@ class DefaultOs {
}
/**
- * @return string
- */
- public function getHostname() {
- $hostname = shell_exec('hostname');
- return $hostname;
- }
-
- /**
* Get memory will return a list key => value where all values are in bytes.
* [MemTotal => 0, MemFree => 0, MemAvailable => 0, SwapTotal => 0, SwapFree => 0].
*
diff --git a/lib/Os.php b/lib/Os.php
index fb646b5..80114b9 100644
--- a/lib/Os.php
+++ b/lib/Os.php
@@ -84,8 +84,7 @@ class Os {
* @return string
*/
public function getHostname() {
- $data = $this->backend->getHostname();
- return $data;
+ return (string)gethostname();
}
/**