[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-developers] Does anyone have a recommendation on stats .pkg's?



I recently downloaded both, webalizer and the stats pkg from 
sourceforge...

I installed both with the GUI.

afterwards i only modified the  /usr/bin/webalizer2.pl to perform not only 
the stats for web but also for ftp an mail...


this is running _hassle_ free on my raq4i

please state your exakt problem !

here my modification within the loop over all sites:


yours


Gerhard W. Recher
(Geschäftsführer)

NETpilot GmbH

Wilhelm-Riehl-Str. 13
D-80687 München

Tel:    ++49 89 547182 0
Fax:    ++49 89 547182 33
GSM:    ++49 171 4802507

w3:     http://www.netpilot.net
e-Mail:   mailto:Gerhard.Recher@xxxxxxxxxxxx


Mods:

#
# do ftp Stats
#

    $thepath = "$prefix/$asite/users/stats/web/ftp";
    # Create a directory /users/stats if it isn't there yet
    if (!-d $thepath)
    {
       mkdir $thepath, 775;
       chown 0, $gid, $thepath;
       chmod 0755, $thepath;
    }

    # Create a .htaccess if it isn't there yet
    if (!-e '$thepath/.htaccess')
    {
       my $string = "#Access file\norder allow,deny\nallow from 
all\nrequire group $name\nAuthname WebStats\nAuthtype Basic";
       open HTACCESS, qq(>$thepath/.htaccess);
       print HTACCESS $string;
       close HTACCESS;
       chmod 0744, qq($thepath/.htaccess);
    }

    # Now just run webalizer
    $messages .=
       `webazolver -N15 -D /home/log/reverse.dns 
$prefix/$asite/logs/ftp.log`;
    $messages .=
       `webalizer -p -n $asite -q -T -D /home/log/reverse.dns -o $thepath 
$prefix/$asite/logs/ftp.log`;
#
# do mail stats
#
    $thepath = "$prefix/$asite/users/stats/web/mail";
    # Create a directory /users/stats if it isn't there yet
    if (!-d $thepath)
    {
       mkdir $thepath, 775;
       chown 0, $gid, $thepath;
       chmod 0755, $thepath;
    }

    # Create a .htaccess if it isn't there yet
    if (!-e '$thepath/.htaccess')
    {
       my $string = "#Access file\norder allow,deny\nallow from 
all\nrequire group $name\nAuthname WebStats\nAuthtype Basic";
       open HTACCESS, qq(>$thepath/.htaccess);
       print HTACCESS $string;
       close HTACCESS;
       chmod 0744, qq($thepath/.htaccess);
    }

    # Now just run webalizer
    $messages .=
       `webazolver -N15 -D /home/log/reverse.dns 
$prefix/$asite/logs/mail.log`;
    $messages .=
       `webalizer -p -n $asite -q -T -D /home/log/reverse.dns -o $thepath 
$prefix/$asite/logs/mail.log`;