Skip to content

Commit 1abf952

Browse files
committed
added CentOS 8 detection to monitoring tools
1 parent 81768b8 commit 1abf952

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

server/lib/classes/monitor_tools.inc.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,14 @@ function get_distname() {
319319
} else {
320320
$distid = 'centos72';
321321
}
322+
} elseif(stristr($content, 'CentOS Linux release 8')) {
323+
preg_match_all('/([0-9]{1,2})\.?([0-9]{0,2})\.?([0-9]*)/', $content, $version);
324+
$distname = 'CentOS';
325+
$distver = is_array($version)? implode('.', array_filter(array($version[1][0],$version[2][0],$version[3][0]),'strlen')) :'Unknown';
326+
$distbaseid = 'fedora';
327+
$var=explode(" ", $content);
328+
$var=explode(".", $var[3]);
329+
$var=$var[0].".".$var[1];
322330
} else {
323331
$distname = 'Redhat';
324332
$distver = 'Unknown';

0 commit comments

Comments
 (0)