add 'goaccess' as new and default traffic analyzer tool

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-11-03 08:58:11 +01:00
parent a052333296
commit a8dc576833
27 changed files with 254 additions and 157 deletions

View File

@@ -633,10 +633,7 @@ class Customers extends ApiCommand implements ResourceEntity
'passwd' => $htpasswdPassword
];
$stats_folder = 'webalizer';
if (Settings::Get('system.awstats_enabled') == '1') {
$stats_folder = 'awstats';
}
$stats_folder = Settings::Get('system.traffictool');
$ins_data['path'] = FileDir::makeCorrectDir($documentroot . '/' . $stats_folder . '/');
$this->logger()->logAction(FroxlorLogger::ADM_ACTION, LOG_NOTICE, "[API] automatically added " . $stats_folder . " htpasswd for user '" . $loginname . "'");
Database::pexecute($ins_stmt, $ins_data, true, true);

View File

@@ -1032,30 +1032,17 @@ class Apache extends HttpConfigBase
{
$stats_text = '';
$statTool = Settings::Get('system.traffictool');
$statDomain = ($domain['parentdomainid'] == '0') ? $domain['domain'] : $domain['parentdomain'];
if ($domain['speciallogfile'] == '1') {
$statDomain = ($domain['parentdomainid'] == '0') ? $domain['domain'] : $domain['parentdomain'];
if (Settings::Get('system.awstats_enabled') == '1') {
$stats_text .= ' Alias /awstats "' . FileDir::makeCorrectFile($domain['customerroot'] . '/awstats/' . $statDomain) . '"' . "\n";
$statDomain = $domain['domain'];
}
$statDocroot = FileDir::makeCorrectFile($domain['customerroot'] . '/'.$statTool.'/' . $statDomain);
$stats_text .= ' Alias /'.$statTool.' "' . $statDocroot . '"' . "\n";
// awstats special requirement for icons
if ($statTool == 'awstats') {
$stats_text .= ' Alias /awstats-icon "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '"' . "\n";
} else {
$stats_text .= ' Alias /webalizer "' . FileDir::makeCorrectFile($domain['customerroot'] . '/webalizer/' . $statDomain) . '"' . "\n";
}
} else {
if ($domain['customerroot'] != $domain['documentroot']) {
if (Settings::Get('system.awstats_enabled') == '1') {
$stats_text .= ' Alias /awstats "' . FileDir::makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
$stats_text .= ' Alias /awstats-icon "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '"' . "\n";
} else {
$stats_text .= ' Alias /webalizer "' . FileDir::makeCorrectFile($domain['customerroot'] . '/webalizer') . '"' . "\n";
}
} elseif (Settings::Get('system.awstats_enabled') == '1') {
// if the docroots are equal, we still have to set an alias for awstats
// because the stats are in /awstats/[domain], not just /awstats/
// also, the awstats-icons are someplace else too!
// -> webalizer does not need this!
$stats_text .= ' Alias /awstats "' . FileDir::makeCorrectFile($domain['documentroot'] . '/awstats/' . $domain['domain']) . '"' . "\n";
$stats_text .= ' Alias /awstats-icon "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '"' . "\n";
}
}
return $stats_text;
@@ -1138,7 +1125,7 @@ class Apache extends HttpConfigBase
$logfiles_text .= ' CustomLog "' . $access_log . '" ' . $logtype . "\n";
}
if (Settings::Get('system.awstats_enabled') == '1') {
if (Settings::Get('system.traffictool') == 'awstats') {
if ((int)$domain['parentdomainid'] == 0) {
// prepare the aliases and subdomains for stats config files
$server_alias = '';

View File

@@ -85,7 +85,7 @@ class ConfigIO
*/
private function cleanAwstatsFiles()
{
if (Settings::Get('system.awstats_enabled') == '0') {
if (Settings::Get('system.traffictool') != 'awstats') {
return;
}

View File

@@ -717,38 +717,18 @@ class Lighttpd extends HttpConfigBase
{
$stats_text = '';
$statTool = Settings::Get('system.traffictool');
$statDomain = ($domain['parentdomainid'] == '0') ? $domain['domain'] : $domain['parentdomain'];
if ($domain['speciallogfile'] == '1') {
if ($domain['parentdomainid'] == '0') {
if (Settings::Get('system.awstats_enabled') == '1') {
$stats_text .= ' alias.url = ( "/awstats/" => "' . FileDir::makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '" )' . "\n";
$stats_text .= ' alias.url += ( "/awstats-icon" => "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '" )' . "\n";
} else {
$stats_text .= ' alias.url = ( "/webalizer/" => "' . FileDir::makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['domain']) . '/" )' . "\n";
}
} else {
if (Settings::Get('system.awstats_enabled') == '1') {
$stats_text .= ' alias.url = ( "/awstats/" => "' . FileDir::makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['parentdomain']) . '" )' . "\n";
$stats_text .= ' alias.url += ( "/awstats-icon" => "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '" )' . "\n";
} else {
$stats_text .= ' alias.url = ( "/webalizer/" => "' . FileDir::makeCorrectFile($domain['customerroot'] . '/webalizer/' . $domain['parentdomain']) . '/" )' . "\n";
}
}
} else {
if ($domain['customerroot'] != $domain['documentroot']) {
if (Settings::Get('system.awstats_enabled') == '1') {
$stats_text .= ' alias.url = ( "/awstats/" => "' . FileDir::makeCorrectFile($domain['customerroot'] . '/awstats/' . $domain['domain']) . '" )' . "\n";
$stats_text .= ' alias.url += ( "/awstats-icon" => "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '" )' . "\n";
} else {
$stats_text .= ' alias.url = ( "/webalizer/" => "' . FileDir::makeCorrectFile($domain['customerroot'] . '/webalizer/') . '" )' . "\n";
}
} elseif (Settings::Get('system.awstats_enabled') == '1') {
// if the docroots are equal, we still have to set an alias for awstats
// because the stats are in /awstats/[domain], not just /awstats/
// also, the awstats-icons are someplace else too!
// -> webalizer does not need this!
$stats_text .= ' alias.url = ( "/awstats/" => "' . FileDir::makeCorrectFile($domain['documentroot'] . '/awstats/' . $domain['domain']) . '" )' . "\n";
$stats_text .= ' alias.url += ( "/awstats-icon" => "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '" )' . "\n";
}
$statDomain = $domain['domain'];
}
$statDocroot = FileDir::makeCorrectFile($domain['customerroot'] . '/'.$statTool.'/' . $statDomain);
$stats_text .= ' alias.url = ( "/'.$statTool.'/" => "' . $statDocroot . '" )' . "\n";
// awstats special requirement for icons
if ($statTool == 'awstats') {
$stats_text .= ' alias.url += ( "/awstats-icon" => "' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '" )' . "\n";
}
return $stats_text;
@@ -837,7 +817,7 @@ class Lighttpd extends HttpConfigBase
$logfiles_text .= ' accesslog.filename = "' . $access_log . '"' . "\n";
}
if (Settings::Get('system.awstats_enabled') == '1') {
if (Settings::Get('system.traffictool') == 'awstats') {
if ((int)$domain['parentdomainid'] == 0) {
// prepare the aliases and subdomains for stats config files
$server_alias = '';

View File

@@ -725,7 +725,7 @@ class Nginx extends HttpConfigBase
$logfiles_text .= "\t" . 'access_log ' . $access_log . ' ' . $logtype . ';' . "\n";
$logfiles_text .= "\t" . 'error_log ' . $error_log . ' ' . Settings::Get('system.errorlog_level') . ';' . "\n";
if (Settings::Get('system.awstats_enabled') == '1') {
if (Settings::Get('system.traffictool') == 'awstats') {
if ((int)$domain['parentdomainid'] == 0) {
// prepare the aliases and subdomains for stats config files
$server_alias = '';
@@ -962,6 +962,7 @@ class Nginx extends HttpConfigBase
switch ($single['path']) {
case '/awstats/':
case '/webalizer/':
case '/goaccess/':
// no stats-alias in "location /"-context
break;
default:
@@ -1023,6 +1024,7 @@ class Nginx extends HttpConfigBase
switch ($single['path']) {
case '/awstats/':
case '/webalizer/':
case '/goaccess/':
$path_options .= $this->getStats($domain, $single);
unset($htpasswds[$idx]);
break;
@@ -1115,35 +1117,21 @@ class Nginx extends HttpConfigBase
{
$stats_text = '';
// define basic path to the stats
if (Settings::Get('system.awstats_enabled') == '1') {
$alias_dir = FileDir::makeCorrectFile($domain['customerroot'] . '/awstats/');
} else {
$alias_dir = FileDir::makeCorrectFile($domain['customerroot'] . '/webalizer/');
$statTool = Settings::Get('system.traffictool');
$statDomain = ($domain['parentdomainid'] == '0') ? $domain['domain'] : $domain['parentdomain'];
if ($domain['speciallogfile'] == '1') {
$statDomain = $domain['domain'];
}
$statDocroot = FileDir::makeCorrectFile($domain['customerroot'] . '/'.$statTool.'/' . $statDomain);
// if this is a parentdomain, we use this domain-name
if ($domain['parentdomainid'] == '0') {
$alias_dir = FileDir::makeCorrectDir($alias_dir . '/' . $domain['domain']);
} else {
$alias_dir = FileDir::makeCorrectDir($alias_dir . '/' . $domain['parentdomain']);
}
if (Settings::Get('system.awstats_enabled') == '1') {
// awstats
$stats_text .= "\t" . 'location ^~ /awstats/ {' . "\n";
} else {
// webalizer
$stats_text .= "\t" . 'location ^~ /webalizer {' . "\n";
}
$stats_text .= "\t\t" . 'alias ' . $alias_dir . ';' . "\n";
$stats_text .= "\t" . 'location ^~ /'.$statTool.' {' . "\n";
$stats_text .= "\t\t" . 'alias ' . $statDocroot . '/;' . "\n";
$stats_text .= "\t\t" . 'auth_basic "' . $single['authname'] . '";' . "\n";
$stats_text .= "\t\t" . 'auth_basic_user_file ' . FileDir::makeCorrectFile($single['usrf']) . ';' . "\n";
$stats_text .= "\t" . '}' . "\n\n";
// awstats icons
if (Settings::Get('system.awstats_enabled') == '1') {
// awstats special requirement for icons
if ($statTool == 'awstats') {
$stats_text .= "\t" . 'location ~ ^/awstats-icon/(.*)$ {' . "\n";
$stats_text .= "\t\t" . 'alias ' . FileDir::makeCorrectDir(Settings::Get('system.awstats_icons')) . '$1;' . "\n";
$stats_text .= "\t" . '}' . "\n\n";

View File

@@ -205,21 +205,16 @@ class TasksCron extends FroxlorCron
$usermaildir = FileDir::makeCorrectDir(Settings::Get('system.vmail_homedir') . '/' . $row['data']['loginname'] . '/');
// stats directory
if (Settings::Get('system.awstats_enabled') == '1') {
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($userhomedir . 'awstats'));
FileDir::safe_exec('mkdir -p ' . escapeshellarg($userhomedir . 'awstats'));
$statsdir = FileDir::makeCorrectDir($userhomedir . '/' . Settings::Get('system.traffictool'));
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($statsdir));
FileDir::safe_exec('mkdir -p ' . escapeshellarg($statsdir));
foreach (['webalizer', 'awstats', 'goaccess'] as $statstools) {
$statsdir = FileDir::makeCorrectDir($userhomedir . '/' . $statstool);
// in case we changed from the other stats -> remove old
// (yes i know, the stats are lost - that's why you should not change all the time!)
if (file_exists($userhomedir . 'webalizer')) {
FileDir::safe_exec('rm -rf ' . escapeshellarg($userhomedir . 'webalizer'));
}
} else {
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_NOTICE, 'Running: mkdir -p ' . escapeshellarg($userhomedir . 'webalizer'));
FileDir::safe_exec('mkdir -p ' . escapeshellarg($userhomedir . 'webalizer'));
// in case we changed from the other stats -> remove old
// (yes i know, the stats are lost - that's why you should not change all the time!)
if (file_exists($userhomedir . 'awstats')) {
FileDir::safe_exec('rm -rf ' . escapeshellarg($userhomedir . 'awstats'));
if (Settings::Get('system.traffictool') != $statstools && file_exists($statsdir)) {
// (yes i know, the stats are lost - that's why you should not change all the time!)
FileDir::safe_exec('rm -rf ' . escapeshellarg($statsdir));
}
}

View File

@@ -185,6 +185,8 @@ class TrafficCron extends FroxlorCron
$current_stamp = time();
$current_year = date('Y', $current_stamp);
$current_month = date('m', $current_stamp);
// @todo locale?
$current_month_short = date('M', $current_stamp);
$current_day = date('d', $current_stamp);
while ($row = $result_stmt->fetch(PDO::FETCH_ASSOC)) {
@@ -215,11 +217,17 @@ class TrafficCron extends FroxlorCron
$httptraffic = 0;
reset($domainlist[$row['customerid']]);
$statsTool = Settings::Get('system.traffictool');
if (isset($speciallogfile_domainlist[$row['customerid']]) && is_array($speciallogfile_domainlist[$row['customerid']]) && count($speciallogfile_domainlist[$row['customerid']]) != 0) {
reset($speciallogfile_domainlist[$row['customerid']]);
if (Settings::Get('system.awstats_enabled') == '0') {
if ($statsTool != 'awstats') {
foreach ($speciallogfile_domainlist[$row['customerid']] as $domainid => $domain) {
$httptraffic += floatval(self::callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
if ($statsTool == 'goaccess') {
$httptraffic += floatval(self::callGoaccessGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/goaccess/' . $domain . '/', $domain, $domainlist[$row['customerid']], ['month' => $current_month_short, 'year' => $current_year]));
} else {
$httptraffic += floatval(self::callWebalizerGetTraffic($row['loginname'] . '-' . $domain, $row['documentroot'] . '/webalizer/' . $domain . '/', $domain, $domainlist[$row['customerid']]));
}
}
}
}
@@ -230,8 +238,10 @@ class TrafficCron extends FroxlorCron
// *not* also in the special-logfiles-loop, because the function
// will iterate through all customer-domains and the awstats-configs
// know the logfile-name, #246
if (Settings::Get('system.awstats_enabled') == '1') {
if ($statsTool == 'awstats') {
$httptraffic += floatval(self::callAwstatsGetTraffic($row['customerid'], $row['documentroot'] . '/awstats/', $domainlist[$row['customerid']], $current_stamp));
} elseif ($statsTool == 'goaccess') {
$httptraffic += floatval(self::callGoaccessGetTraffic($row['loginname'], $row['documentroot'] . '/goaccess/', $caption, $domainlist[$row['customerid']], ['month' => $current_month_short, 'year' => $current_year]));
} else {
$httptraffic += floatval(self::callWebalizerGetTraffic($row['loginname'], $row['documentroot'] . '/webalizer/', $caption, $domainlist[$row['customerid']]));
}
@@ -608,19 +618,59 @@ class TrafficCron extends FroxlorCron
}
}
/**
* Run goaccess to create statistics and return used traffic since last run
*
* @param string $logfile Name of logfile
* @param string $outputdir Place where stats should be build
* @param string $caption Caption for webalizer output
* @param array $usersdomainlist
*
* @return int Used traffic
*/
private static function callGoaccessGetTraffic($logfile, $outputdir, $caption, array $usersdomainlist = [], array $monthyear_arr = [])
{
$returnval = 0;
$logfile = FileDir::makeCorrectFile(Settings::Get('system.logfiles_directory') . $logfile . '-access.log');
if (file_exists($logfile)) {
$outputdir = FileDir::makeCorrectDir($outputdir);
if (!file_exists($outputdir)) {
FileDir::safe_exec('mkdir -p ' . escapeshellarg($outputdir));
}
if (file_exists($outputdir . '.tmp.json')) {
@unlink($outputdir . '.tmp.json');
}
$format = Settings::Get('system.logfiles_type') == '2' ? 'VCOMBINED' : 'COMBINED';
$monthyear = $monthyear_arr['month'] . '/' . $monthyear_arr['year'];
$return_value = false;
FileDir::safe_exec("grep '" . $monthyear . "' " . escapeshellarg($logfile) . " | goaccess -o " . escapeshellarg($outputdir . '.tmp.json') . " -o " . escapeshellarg($outputdir . 'index.html') . " --html-report-title=" . escapeshellarg($caption) . " --log-format=" . $format . " - ", $return_value, ['|']);
if (file_exists($outputdir . '.tmp.json')) {
$statscontent = json_decode(file_get_contents($outputdir . '.tmp.json'), true);
if ($statscontent) {
$returnval = $statscontent['general']['bandwidth'] ?? 0;
}
@unlink($outputdir . '.tmp.json');
}
}
return $returnval;
}
/**
* Function which make webalizer statistics and returns used traffic since last run
*
* @param
* string Name of logfile
* @param
* string Place where stats should be build
* @param
* string Caption for webalizer output
* @return int Used traffic
* @author Florian Lippert <flo@syscp.org> (2003-2009)
* @param string $logfile Name of logfile
* @param string $outputdir Place where stats should be build
* @param string $caption Caption for webalizer output
* @param array $usersdomainlist
*
* @return float Used traffic
*/
private static function callWebalizerGetTraffic($logfile, $outputdir, $caption, $usersdomainlist)
private static function callWebalizerGetTraffic($logfile, $outputdir, $caption, array $usersdomainlist = [])
{
$returnval = 0;
@@ -738,7 +788,7 @@ class TrafficCron extends FroxlorCron
// as we check for the config-model awstats will only parse
// 'real' domains and no subdomains which are aliases in the
// model-config-file.
$returnval += self::awstatsDoSingleDomain($singledomain, $outputdir);
$returnval += self::awstatsDoSingleDomain($singledomain, $outputdir, $current_stamp);
}
/**
@@ -774,7 +824,7 @@ class TrafficCron extends FroxlorCron
return floatval($returnval);
}
private static function awstatsDoSingleDomain($domain, $outputdir)
private static function awstatsDoSingleDomain($domain, $outputdir, $current_stamp)
{
$returnval = 0;
@@ -799,7 +849,7 @@ class TrafficCron extends FroxlorCron
}
FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_INFO, "Running awstats_buildstaticpages.pl for domain '" . $domain . "' (Output: '" . $staticOutputdir . "')");
FileDir::safe_exec($awbsp . ' -awstatsprog=' . escapeshellarg($awprog) . ' -update -month=' . date('m') . ' -year=' . date('Y') . ' -config=' . $domain . ' -dir=' . escapeshellarg($staticOutputdir));
FileDir::safe_exec($awbsp . ' -awstatsprog=' . escapeshellarg($awprog) . ' -update -month=' . date('m', $current_stamp) . ' -year=' . date('Y', $current_stamp) . ' -config=' . $domain . ' -dir=' . escapeshellarg($staticOutputdir));
// update our awstats index files
self::awstatsGenerateIndex($domain, $outputdir);

View File

@@ -34,7 +34,7 @@ final class Froxlor
const VERSION = '2.0.0-beta1';
// Database version (YYYYMMDDC where C is a daily counter)
const DBVERSION = '202112310';
const DBVERSION = '202211030';
// Distribution branding-tag (used for Debian etc.)
const BRANDING = '';

View File

@@ -148,12 +148,7 @@ class Statistics
}
// get correct directory
$dir = $row['documentroot'];
if (Settings::Get('system.awstats_enabled') == '1') {
$dir .= '/awstats/';
} else {
$dir .= '/webalizer/';
}
$dir = $row['documentroot'] . '/' . Settings::Get('system.traffictool') . '/';
// only run chown if directory exists
if (file_exists($dir)) {

View File

@@ -661,7 +661,7 @@ class Core
private function createJsonArray()
{
$system_params = ["cron", "libnssextrausers", "logrotate"];
$system_params = ["cron", "libnssextrausers", "logrotate", "goaccess"];
if ($this->validatedData['webserver_backend'] == 'php-fpm') {
$system_params[] = 'php-fpm';
} elseif ($this->validatedData['webserver_backend'] == 'fcgid') {

View File

@@ -469,4 +469,23 @@ class Store
}
return $value;
}
public static function storeSettingUpdateTrafficTool($fieldname, $fielddata, $newfieldvalue)
{
$returnvalue = self::storeSettingField($fieldname, $fielddata, $newfieldvalue);
if ($returnvalue !== false && is_array($fielddata) && isset($fielddata['settinggroup']) && $fielddata['settinggroup'] == 'system' && isset($fielddata['varname']) && $fielddata['varname'] == 'traffictool' && $newfieldvalue != $fielddata['value']) {
$oldpath = '/'.$fielddata['value'].'/';
$newpath = '/'.$newfieldvalue.'/';
$upd_stmt = Database::query("
UPDATE `" . TABLE_PANEL_HTPASSWDS . "` SET `path` = :newpath WHERE `path` = :oldpath
");
Database::pexecute($upd_stmt, [
'newpath' => $newpath,
'oldpath' => $oldpath
]);
}
return $returnvalue;
}
}

View File

@@ -81,11 +81,8 @@ class Domain
$result .= '<a href="http://' . $attributes['data'] . '" target="_blank">' . $attributes['data'] . '</a>';
// check for statistics if parentdomainid==0 to show stats-link for customers
if ((int)UI::getCurrentUser()['adminsession'] == 0 && $attributes['fields']['parentdomainid'] == 0) {
$statsapp = 'webalizer';
if (Settings::Get('system.awstats_enabled') == '1') {
$statsapp = 'awstats';
}
$result .= ' <a href="http://' . $attributes['data'] . '/' . $statsapp . '" rel="external" title="' . lng('domains.statstics') . '"><i class="fa-solid fa-chart-line text-secondary"></i></a>';
$statsapp = Settings::Get('system.traffictool');
$result .= ' <a href="http://' . $attributes['data'] . '/' . $statsapp . '" rel="external" target="_blank" title="' . lng('domains.statstics') . '"><i class="fa-solid fa-chart-line text-secondary"></i></a>';
}
if ($attributes['fields']['registration_date'] != '') {
$result .= '<br><small>' . lng('domains.registration_date') . ': ' . $attributes['fields']['registration_date'] . '</small>';

View File

@@ -4579,9 +4579,19 @@ UPLOADGID=
</service>
<!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Webalizer -->
<daemon name="webalizer"
title="Webalizer (traffic analyzer)">
<install><![CDATA[apt-get install webalizer]]></install>
</daemon>
<!-- goaccess -->
<daemon name="goaccess"
title="goaccess (traffic analyzer)" default="true">
<install><![CDATA[apt-get install goaccess]]></install>
</daemon>
<!-- AWstats -->
<daemon name="awstats"
title="Awstats (webalizer alternative)">
title="Awstats (traffic analyzer)">
<install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>

View File

@@ -3218,9 +3218,19 @@ UPLOADGID=
</service>
<!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Webalizer -->
<daemon name="webalizer"
title="Webalizer (traffic analyzer)">
<install><![CDATA[apt-get install webalizer]]></install>
</daemon>
<!-- goaccess -->
<daemon name="goaccess"
title="goaccess (traffic analyzer)" default="true">
<install><![CDATA[apt-get install goaccess]]></install>
</daemon>
<!-- AWstats -->
<daemon name="awstats"
title="Awstats (webalizer alternative)">
title="Awstats (traffic analyzer)">
<install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>

View File

@@ -4790,9 +4790,19 @@ UPLOADGID=
</service>
<!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Webalizer -->
<daemon name="webalizer"
title="Webalizer (traffic analyzer)">
<install><![CDATA[apt-get install webalizer]]></install>
</daemon>
<!-- goaccess -->
<daemon name="goaccess"
title="goaccess (traffic analyzer)" default="true">
<install><![CDATA[apt-get install goaccess]]></install>
</daemon>
<!-- AWstats -->
<daemon name="awstats"
title="Awstats (webalizer alternative)">
title="Awstats (traffic analyzer)">
<install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>

View File

@@ -4781,9 +4781,19 @@ UPLOADGID=
</service>
<!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Webalizer -->
<daemon name="webalizer"
title="Webalizer (traffic analyzer)">
<install><![CDATA[apt-get install webalizer]]></install>
</daemon>
<!-- goaccess -->
<daemon name="goaccess"
title="goaccess (traffic analyzer)" default="true">
<install><![CDATA[apt-get install goaccess]]></install>
</daemon>
<!-- AWstats -->
<daemon name="awstats"
title="Awstats (webalizer alternative)">
title="Awstats (traffic analyzer)">
<install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>

View File

@@ -3996,9 +3996,19 @@ UPLOADGID=
</service>
<!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Webalizer -->
<daemon name="webalizer"
title="Webalizer (traffic analyzer)">
<install><![CDATA[apt-get install webalizer]]></install>
</daemon>
<!-- goaccess -->
<daemon name="goaccess"
title="goaccess (traffic analyzer)" default="true">
<install><![CDATA[apt-get install goaccess]]></install>
</daemon>
<!-- AWstats -->
<daemon name="awstats"
title="Awstats (webalizer alternative)">
title="Awstats (traffic analyzer)">
<install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>

View File

@@ -3664,9 +3664,19 @@ account required pam_mysql.so user=<SQL_UNPRIVILEGED_USER> passwd=<SQL_UN
</service>
<!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Webalizer -->
<daemon name="webalizer"
title="Webalizer (traffic analyzer)">
<install><![CDATA[emerge app-admin/webalizer]]></install>
</daemon>
<!-- goaccess -->
<daemon name="goaccess"
title="goaccess (traffic analyzer)" default="true">
<install><![CDATA[emerge net-analyzer/goaccess]]></install>
</daemon>
<!-- AWstats -->
<daemon name="awstats"
title="Awstats (webalizer alternative)">
title="Awstats (traffic analyzer)">
<install><![CDATA[emerge www-misc/awstats]]></install>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's|^\\(DirIcons=\\).*$|\\1\\"/awstats-icon\\"|' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>

View File

@@ -3996,9 +3996,19 @@ UPLOADGID=
</service>
<!-- System tools/services -->
<service type="system" title="{{lng.admin.configfiles.etc}}">
<!-- Webalizer -->
<daemon name="webalizer"
title="Webalizer (traffic analyzer)">
<install><![CDATA[apt-get install webalizer]]></install>
</daemon>
<!-- goaccess -->
<daemon name="goaccess"
title="goaccess (traffic analyzer)" default="true">
<install><![CDATA[apt-get install goaccess]]></install>
</daemon>
<!-- AWstats -->
<daemon name="awstats"
title="Awstats (webalizer alternative)">
title="Awstats (traffic analyzer)">
<install><![CDATA[apt-get install awstats]]></install>
<command><![CDATA[mv {{settings.system.awstats_conf}}/awstats.conf {{settings.system.awstats_conf}}/awstats.model.conf]]></command>
<command><![CDATA[sed -i.bak 's/^DirData/# DirData/' {{settings.system.awstats_conf}}/awstats.model.conf]]></command>