File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed
Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -1571,15 +1571,20 @@ public function monitorFreshClamLog() {
15711571 * Now we have the last log in the array.
15721572 * Check if the outdated-string is found...
15731573 */
1574+ $ clamav_outdated_warning = false ;
1575+ $ clamav_bytecode_updated = false ;
15741576 foreach ($ lastLog as $ line ) {
1575- if (strpos (strtolower ($ line ), 'outdated ' ) !== false ) {
1576- /*
1577- * Outdatet is only info, because if we set this to warning, the server is
1578- * as long in state warning, as there is a new version of ClamAv which takes
1579- * sometimes weeks!
1580- */
1581- $ state = $ this ->_setState ($ state , 'info ' );
1577+ if (stristr ($ line ,'outdated ' )) {
1578+ $ clamav_outdated_warning = true ;
15821579 }
1580+ if (stristr ($ line ,'main.cld is up to date ' )) {
1581+ $ clamav_bytecode_updated = true ;
1582+ }
1583+ }
1584+
1585+ //* Warn when clamav is outdated and main.cld update failed.
1586+ if ($ clamav_outdated_warning == true && $ clamav_bytecode_updated == false ) {
1587+ $ state = $ this ->_setState ($ state , 'info ' );
15831588 }
15841589
15851590 /*
You can’t perform that action at this time.
0 commit comments