We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f59865b commit 2d6162fCopy full SHA for 2d6162f
server/lib/classes/cron.d/100-monitor_system_update.inc.php
@@ -159,6 +159,18 @@ public function onRunJob() {
159
* Fetch the output
160
*/
161
$data['output'] = shell_exec('zypper lu');
162
+ } else if (file_exists('/etc/redhat-release')) {
163
+
164
+ if(shell_exec("yum list updates | awk 'p; /Updated Packages/ {p=1}'") == '') {
165
+ // There is nothing to update
166
+ $state = 'ok';
167
+ }
168
+ else {
169
+ $state = 'info';
170
171
+ // Fetch the output
172
+ $yumData = shell_exec('yum check-update');
173
+ $data['output'] = $yumData;
174
} else {
175
/*
176
* It is not Debian/Ubuntu, so there is no data and no state
0 commit comments