diff options
author | jim-p <jimp@pfsense.org> | 2014-05-09 13:25:23 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2014-05-09 13:25:23 -0400 |
commit | 5e99c25048ab4544fd973a1f1cc4d4beccf770ef (patch) | |
tree | 8d7b4f4a2436828a6f2c65c314d1da810cea7af1 /config/mailreport | |
parent | 2b8fc451d704a70315e59b2bb238ab3a775b4f55 (diff) | |
download | pfsense-packages-5e99c25048ab4544fd973a1f1cc4d4beccf770ef.tar.gz pfsense-packages-5e99c25048ab4544fd973a1f1cc4d4beccf770ef.tar.bz2 pfsense-packages-5e99c25048ab4544fd973a1f1cc4d4beccf770ef.zip |
Check new and old path for clog when generating mail report. Bump.
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..2742844b 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/local/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> |