Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
Open sidebar
ISPConfig
ISPConfig 3
Commits
242b70ca
Commit
242b70ca
authored
Aug 14, 2022
by
Michael Seevogel
Browse files
- Check for different pure-ftpd log file locations (fixes FTP stats for EPEL/RHEL)
- Updated edit links in html template
parent
5bbec2b9
Changes
2
Hide whitespace changes
Inline
Side-by-side
interface/web/sites/templates/ftp_sites_stats_list.htm
View file @
242b70ca
...
...
@@ -30,10 +30,10 @@
<tmpl_loop
name=
"records"
>
<tr>
<td><a
target=
"_blank"
href=
"http://{tmpl_var name="
domain
"}/
stats
"
>
{tmpl_var name="domain"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_
<tmpl_if name='type' op='==' value='
vhost
sub
domain
'>vhost_sub</tmpl_if><
tmpl_
if
name='
type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id
'}"
>
{tmpl_var name="this_month_in"}/{tmpl_var name="this_month_out"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_
<tmpl_if name='type' op='==' value='
vhost
sub
domain
'>vhost_sub</tmpl_if><
tmpl_
if
name='
type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id
'}"
>
{tmpl_var name="last_month_in"}/{tmpl_var name="last_month_out"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_
<tmpl_if name='type' op='==' value='
vhost
sub
domain
'>vhost_sub</tmpl_if><
tmpl_
if
name='
type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id
'}"
>
{tmpl_var name="this_year_in"}/{tmpl_var name="this_year_out"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_
<tmpl_if name='type' op='==' value='
vhost
sub
domain
'>vhost_sub</tmpl_if><
tmpl_
if
name='
type' op='==' value='vhostalias'>vhost_alias</tmpl_if>domain_edit.php?id={tmpl_var name='id
'}"
>
{tmpl_var name="last_year_in"}/{tmpl_var name="last_year_out"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_vhost
_
domain
_edit.php?id={
tmpl_
var
name='
id'}&type={tmpl_var name='vhostdomain_type
'}"
>
{tmpl_var name="this_month_in"}/{tmpl_var name="this_month_out"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_vhost
_
domain
_edit.php?id={
tmpl_
var
name='
id'}&type={tmpl_var name='vhostdomain_type
'}"
>
{tmpl_var name="last_month_in"}/{tmpl_var name="last_month_out"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_vhost
_
domain
_edit.php?id={
tmpl_
var
name='
id'}&type={tmpl_var name='vhostdomain_type
'}"
>
{tmpl_var name="this_year_in"}/{tmpl_var name="this_year_out"}
</a></td>
<td><a
href=
"#"
data-load-content=
"sites/web_vhost
_
domain
_edit.php?id={
tmpl_
var
name='
id'}&type={tmpl_var name='vhostdomain_type
'}"
>
{tmpl_var name="last_year_in"}/{tmpl_var name="last_year_out"}
</a></td>
<td
class=
"text-right"
></td>
</tr>
</tmpl_loop>
...
...
server/lib/classes/cron.d/200-ftplogfiles.inc.php
View file @
242b70ca
...
...
@@ -32,7 +32,17 @@ class cronjob_ftplogfiles extends cronjob {
// Make the ftp logfiles directories world readable to enable ftp access
//######################################################################################################
if
(
is_dir
(
'/var/log/pure-ftpd/'
))
exec
(
'chmod +r /var/log/pure-ftpd/*'
);
$logfile
=
null
;
if
(
is_dir
(
'/var/log/pure-ftpd/'
))
{
exec
(
'chmod +r /var/log/pure-ftpd/*'
);
$logfile
=
"/var/log/pure-ftpd/transfer.log.1"
;
}
elseif
(
is_file
(
'/var/log/pureftpd.log'
))
{
$logfile
=
"/var/log/pureftpd.log"
;
}
else
{
$app
->
log
(
"The pure-ftpd log file could not be found."
,
LOGLEVEL_DEBUG
);
return
false
;
}
//######################################################################################################
// Manage and compress ftp logfiles and create traffic statistics
...
...
@@ -71,7 +81,7 @@ class cronjob_ftplogfiles extends cronjob {
}
}
$fp
=
@
fopen
(
'/var/log/pure-ftpd/transfer.log.1'
,
'r'
);
$fp
=
@
fopen
(
$logfile
,
'r'
);
$ftp_traffic
=
array
();
if
(
$fp
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment