File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
server/lib/classes/cron.d Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -132,15 +132,20 @@ public function onRunJob() {
132132 * Now we have the last log in the array.
133133 * Check if the outdated-string is found...
134134 */
135+ $ clamav_outdated_warning = false ;
136+ $ clamav_bytecode_updated = false ;
135137 foreach ($ lastLog as $ line ) {
136- if (strpos (strtolower ($ line ), 'outdated ' ) !== false ) {
137- /*
138- * Outdatet is only info, because if we set this to warning, the server is
139- * as long in state warning, as there is a new version of ClamAv which takes
140- * sometimes weeks!
141- */
142- $ state = $ this ->_tools ->_setState ($ state , 'info ' );
138+ if (stristr ($ line ,'outdated ' )) {
139+ $ clamav_outdated_warning = true ;
143140 }
141+ if (stristr ($ line ,'main.cld is up to date ' )) {
142+ $ clamav_bytecode_updated = true ;
143+ }
144+ }
145+
146+ //* Warn when clamav is outdated and main.cld update failed.
147+ if ($ clamav_outdated_warning == true && $ clamav_bytecode_updated == false ) {
148+ $ state = $ this ->_setState ($ state , 'info ' );
144149 }
145150
146151 $ res = array ();
You can’t perform that action at this time.
0 commit comments