Add OS check looking for SME server

This commit is contained in:
John Crisp
2020-02-27 16:18:12 +01:00
parent 7688966f98
commit 1a2c925f08

View File

@@ -238,4 +238,15 @@ function my_file_get_contents($f) {
return implode('', file($f));
}
function getOSInformation() {
if (false == function_exists("shell_exec")) {
return null;
}
$os = shell_exec('cat /etc/redhat-release');
if (preg_match('/^SME Server/', $os)) {
return true;
} else {
return null;
}
}
?>