- implemented alternative regex-validation for broken php "filter_var" function in various php-versions, refs #109, #122, #138

- check for webalizer binary in /usr/bin and in /usr/local/bin (freebsd), fixes #140
This commit is contained in:
Michael Kaufmann (d00p)
2010-04-12 11:09:53 +00:00
parent 6c25cd1c85
commit cf18590b84
3 changed files with 24 additions and 4 deletions

View File

@@ -191,6 +191,14 @@ function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlis
$verbosity = '-Q';
}
$we = '/usr/bin/webalizer';
// FreeBSD uses other paths, #140
if(!file_exists($we))
{
$we = '/usr/local/bin/webalizer';
}
$cronlog->logAction(CRON_ACTION, LOG_INFO, "Running webalizer for domain '".$caption."'");
safe_exec('webalizer ' . $verbosity . ' -p -o ' . escapeshellarg($outputdir) . ' -n ' . escapeshellarg($caption) . $domainargs . ' ' . escapeshellarg($settings['system']['logfiles_directory'] . $logfile . '-access.log'));