diff options
author | Frank Karlitschek <karlitschek@gmx.de> | 2019-03-06 19:27:12 +0300 |
---|---|---|
committer | Frank Karlitschek <karlitschek@gmx.de> | 2019-03-06 19:27:12 +0300 |
commit | 9a8d2a053b480507785a8b6ec7acefb6ef07b3b0 (patch) | |
tree | a0205799097580905b410c381fafd00fe2409a6a /lib | |
parent | d798eaf85e30801ba394dc9515b5d1760f666d8f (diff) |
read /etc/systemd/timesyncd.conf additionally which is used by newer distros
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/OperatingSystems/DefaultOs.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/OperatingSystems/DefaultOs.php b/lib/OperatingSystems/DefaultOs.php index a83fc3e..11e242f 100755 --- a/lib/OperatingSystems/DefaultOs.php +++ b/lib/OperatingSystems/DefaultOs.php @@ -94,8 +94,9 @@ class DefaultOs { * @return string */ public function getTimeServers() { - $uptime = shell_exec('cat /etc/ntp.conf |grep \'^pool\' | cut -f 2 -d " "'); - return $uptime; + $servers = shell_exec('cat /etc/ntp.conf |grep \'^pool\' | cut -f 2 -d " "'); + $servers.= ' '.shell_exec('cat /etc/systemd/timesyncd.conf |grep \'^pool\' | cut -f 2 -d " "'); + return $servers; } /** |