Skip to content
Snippets Groups Projects
Commit ce4d2d97 authored by Marius Burkard's avatar Marius Burkard
Browse files

Merge branch '3.1.15p2-updates' into 'stable-3.1'

added update status check for Redhat based distros

See merge request ispconfig/ispconfig3!935
parents ff920a38 8f069999
No related branches found
No related tags found
No related merge requests found
......@@ -159,7 +159,29 @@ class cronjob_monitor_system_update extends cronjob {
* Fetch the output
*/
$data['output'] = shell_exec('zypper lu');
} else {
} elseif(file_exists('/etc/redhat-release')) {
/*
* update and find the upgrade.
* if there is any output, then there is a needed update
*/
$aptData = shell_exec('yum -q list updates');
if ($aptData == '') {
/* There is nothing to update! */
$state = 'ok';
} else {
/*
* There is something to update! this is in most cases not critical, so we can
* do a system-update once a month or so...
*/
$state = 'info';
}
/*
* Fetch the output
*/
$data['output'] = shell_exec('yum -q list updates');
} else {
/*
* It is not Debian/Ubuntu, so there is no data and no state
*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment