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

@@ -575,8 +575,6 @@ opcache.validate_timestamps'),
('system', 'default_sslvhostconf', ''),
('system', 'mail_quota_enabled', '0'),
('system', 'mail_quota', '100'),
('system', 'webalizer_enabled', '1'),
('system', 'awstats_enabled', '0'),
('system', 'httpuser', 'www-data'),
('system', 'httpgroup', 'www-data'),
('system', 'webserver', 'apache2'),
@@ -700,6 +698,7 @@ opcache.validate_timestamps'),
('system', 'update_channel', 'stable'),
('system', 'updatecheck_data', ''),
('system', 'update_notify_last', '2.0.0-beta1'),
('system', 'traffictool', 'goaccess'),
('api', 'enabled', '0'),
('2fa', 'enabled', '1'),
('panel', 'decimal_places', '4'),
@@ -743,7 +742,7 @@ opcache.validate_timestamps'),
('panel', 'logo_overridecustom', '0'),
('panel', 'settings_mode', '0'),
('panel', 'version', '2.0.0-beta1'),
('panel', 'db_version', '202112310');
('panel', 'db_version', '202211030');
DROP TABLE IF EXISTS `panel_tasks`;

View File

@@ -176,3 +176,14 @@ if (Froxlor::isFroxlorVersion('0.10.38')) {
Froxlor::updateToVersion($update_to);
}
if (Froxlor::isDatabaseVersion('202112310')) {
Update::showUpdateStep("Adjusting traffic tool settings");
$traffic_tool = Settings::Get('system.awstats_enabled') == 1 ? 'awstats' : 'webalizer';
Settings::AddNew("system.traffictool", $traffic_tool);
Database::query("DELETE FROM `" . TABLE_PANEL_SETTINGS . "` WHERE `settinggroup` = 'system' AND `varname` = 'awstats_enabled'");
Update::lastStepStatus(0);
Froxlor::updateToDbVersion('202211030');
}