Skip to content

Commit 57ca2d7

Browse files
committed
small adjustments and some clean up of the GoAccess code
1 parent 524b4d4 commit 57ca2d7

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

server/lib/classes/cron.d/150-goaccess.inc.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public function onRunJob() {
144144

145145
if(!@is_dir($statsdir)) $app->system->mkdirpath($statsdir, 0755, $username, $groupname);
146146

147-
$goa_db_dir = $docroot.'/'.$web_folder.'/stats/.db/';
147+
$goa_db_dir = $docroot.'/log/goaccess_db';
148148
$output_html = $docroot.'/'.$web_folder.'/stats/goaindex.html';
149149
if(!@is_dir($goa_db_dir)) $app->system->mkdirpath($goa_db_dir);
150150

@@ -177,11 +177,6 @@ public function onRunJob() {
177177
$app->system->mkdirpath($statsdirold, 0755, $username, $groupname);
178178
}
179179

180-
// don't rotate db files per month
181-
//rename($goa_db_dir, $statsdirold.'db');
182-
//mkdir($goa_db_dir);
183-
184-
185180
$files = scandir($statsdir);
186181

187182
foreach ($files as $file) {
@@ -204,7 +199,7 @@ public function onRunJob() {
204199
* For versions prior 1.4 you need GoAccess with btree support compiled!
205200
*/
206201

207-
$cust_lang = $conf['language']."_".strtoupper($conf['language']);
202+
$cust_lang = $conf['language']."_".strtoupper($conf['language'])."UTF-8";
208203

209204
if(version_compare($goaccess_version,1.4) >= 0) {
210205
$app->system->exec_safe("LANG=? goaccess -f ? --config-file ? --restore --persist --db-path=? --output=?", $cust_lang, $logfile, $goaccess_conf, $goa_db_dir, $output_html);

server/plugins-available/apache2_plugin.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3079,8 +3079,8 @@ private function goaccess_update ($data, $web_config) {
30793079
}
30803080
}
30813081

3082-
if(!is_dir($data['new']['document_root']."/" . $web_folder . "/stats/.db")) $app->system->mkdirpath($data['new']['document_root'] . "/" . $web_folder . "/stats/.db");
3083-
$goaccess_conf = $data['new']['document_root'].'/log/goaccess.conf';
3082+
if(!is_dir($data['new']['document_root'] . "/log/goaccess_db")) $app->system->mkdirpath($data['new']['document_root'] . "/log/goaccess_db");
3083+
$goaccess_conf = $data['new']['document_root'].'/log/goaccess.conf';
30843084

30853085
/*
30863086
In case that you use a different log format, you should use a custom goaccess.conf which you'll have to put into /usr/local/ispconfig/server/conf-custom/.

server/plugins-available/nginx_plugin.inc.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2604,7 +2604,7 @@ private function goaccess_update ($data, $web_config) {
26042604
}
26052605
}
26062606

2607-
if(!is_dir($data['new']['document_root']."/" . $web_folder . "/stats/.db")) $app->system->mkdirpath($data['new']['document_root'] . "/" . $web_folder . "/stats/.db");
2607+
if(!is_dir($data['new']['document_root'] . "/log/goaccess_db")) $app->system->mkdirpath($data['new']['document_root'] . "/log/goaccess_db");
26082608
$goaccess_conf = $data['new']['document_root'].'/log/goaccess.conf';
26092609

26102610
/*

0 commit comments

Comments
 (0)