diff options
author | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-03-16 16:50:43 +0300 |
---|---|---|
committer | Daniel Kesselberg <mail@danielkesselberg.de> | 2020-03-17 22:33:39 +0300 |
commit | 275b70bcbdde46a11d36ec793cdaa7658a0bc692 (patch) | |
tree | 395b4c46215145b0a045d956f2e15b7901db3a71 /lib | |
parent | c4e07900090877a1e8c9baef796b3af2ab5b99a2 (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.php | 8 | ||||
-rw-r--r-- | lib/Os.php | 3 |
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]. * @@ -84,8 +84,7 @@ class Os { * @return string */ public function getHostname() { - $data = $this->backend->getHostname(); - return $data; + return (string)gethostname(); } /** |