Changeset 1046 for trunk/alternc-awstats


Ignore:
Timestamp:
09/08/04 22:12:06 (9 years ago)
Author:
anonymous
Message:
  • ajout changement de pass
  • creation du dossier cache
  • ajout de l'alias apache awstats-icons
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/alternc-awstats

    r1037 r1046  
    22. /etc/alternc/local.sh 
    33 
    4 #if [ -e /etc/alternc/webalizer.conf ] 
    5 #then 
    6 #    . /etc/alternc/webalizer.conf 
    7 #fi 
     4# This file specify a different ACCESSLOG when there is apachemerge in the server. 
     5if [ -e /etc/alternc/webalizer.conf ] 
     6then 
     7    . /etc/alternc/webalizer.conf 
     8fi 
    89 
    910if [ -z "$ACCESSLOG" ]  
     
    1819 
    1920CACHEDIR="/var/cache/awstats" 
    20 TMPDNS=`mktemp -p /tmp` 
    21 TMPLOG=`mktemp -p /tmp` 
     21TMPLOG=`/tmp/awstats.apache.log` 
    2222mkdir -p $CACHEDIR 
    2323trap cleanup 1 2 15 
    2424 
    2525function cleanup { 
    26     rm -f $TMPDNS 
    2726    rm -f $TMPLOG 
    28 #    rm -rf $CACHEDIR/* 
    2927} 
    3028 
     
    3331    while [ "$DOM" ] 
    3432    do     
    35       #export LC_ALL="$LANG" 
    36       #export LC_MESSAGES="$LANG" 
    37       #export LANG 
    3833      echo "processing $DOM" 
    39       # first run: resolve IPs in cache 
    40       #grep -h " $DOM$" $ACCESSLOG | /usr/bin/webalizer -c $CACHEDIR/$DOM.conf -N 5 -D $TMPDNS - &>/dev/null 
    41       # second run: process the stats 
     34      grep -h " $DOM$" $ACCESSLOG >$TMPLOG 2>/dev/null 
    4235      /usr/lib/cgi-bin/awstats.pl -config=$DOM  
    4336      read DOM 
     
    4538} 
    4639 
    47 # Clear the cache dir 
    48 # DONT do it ! it looses all previously computed data !  
    49 #rm -rf $CACHEDIR/*  
    50 # Fill the cache dir (/etc dir) 
    51 # not required: m_aws.php build it properly 
    52 # /usr/lib/alternc/awstats.cache.php 
    53  
    5440# Launch the stat 
    5541mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" -B -e "SELECT hostname FROM aws" |grep -v "^hostname" | dostat 
Note: See TracChangeset for help on using the changeset viewer.