diff options
Diffstat (limited to 'config/mailreport')
-rw-r--r-- | config/mailreport/mail_reports.inc | 8 | ||||
-rw-r--r-- | config/mailreport/mailreport.xml | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/config/mailreport/mail_reports.inc b/config/mailreport/mail_reports.inc index 5d9e74b2..0119457a 100644 --- a/config/mailreport/mail_reports.inc +++ b/config/mailreport/mail_reports.inc @@ -1243,7 +1243,13 @@ function mail_report_get_log($logfile, $tail, $grepfor) { if(isset($config['system']['usefifolog'])) { exec("/usr/sbin/fifolog_reader {$logfile}{$grepline} | /usr/bin/tail -n {$tail}", $logarr); } else { - exec("/usr/sbin/clog {$logfile}{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail -n {$tail}", $logarr); + if (is_executable("/usr/local/sbin/clog")) { + exec("/usr/local/sbin/clog {$logfile}{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail -n {$tail}", $logarr); + } elseif (is_executable("/usr/sbin/clog")) { + exec("/usr/sbin/clog {$logfile}{$grepline}| grep -v \"CLOG\" | grep -v \"\033\" | /usr/bin/tail -n {$tail}", $logarr); + } else { + $logarr = array("Cannot locate clog which is required for reading log files."); + } } } return($logarr); diff --git a/config/mailreport/mailreport.xml b/config/mailreport/mailreport.xml index fe6899d4..9239f82e 100644 --- a/config/mailreport/mailreport.xml +++ b/config/mailreport/mailreport.xml @@ -37,7 +37,7 @@ ]]> </copyright> <name>mailreport</name> - <version>2.0.11</version> + <version>2.0.12</version> <title>Status: Email Reports</title> <additional_files_needed> <prefix>/usr/local/bin/</prefix> |