Changeset 1035
- Timestamp:
- 09/07/04 23:55:37 (9 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
-
alternc-awstats (modified) (4 diffs)
-
awstats.template.conf (modified) (2 diffs)
-
bureau/admin/aws_list.php (modified) (1 diff)
-
bureau/admin/menu_awstats.php (modified) (1 diff)
-
bureau/class/m_aws.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/alternc-awstats
r1030 r1035 2 2 . /etc/alternc/local.sh 3 3 4 if [ -e /etc/alternc/webalizer.conf ]5 then6 . /etc/alternc/webalizer.conf7 fi4 #if [ -e /etc/alternc/webalizer.conf ] 5 #then 6 # . /etc/alternc/webalizer.conf 7 #fi 8 8 9 9 if [ -z "$ACCESSLOG" ] … … 17 17 fi 18 18 19 CACHEDIR="/var/cache/alternc- webalizer"19 CACHEDIR="/var/cache/alternc-awstats" 20 20 TMPDNS=`mktemp -p /tmp` 21 21 TMPLOG=`mktemp -p /tmp` … … 30 30 31 31 function dostat { 32 read LANGDOM32 read DOM 33 33 while [ "$DOM" ] 34 34 do 35 export LC_ALL="$LANG"36 export LC_MESSAGES="$LANG"37 export LANG38 35 #export LC_ALL="$LANG" 36 #export LC_MESSAGES="$LANG" 37 #export LANG 38 echo "processing $DOM" 39 39 # first run: resolve IPs in cache 40 grep -h " $DOM$" $ACCESSLOG | /usr/bin/webalizer -c $CACHEDIR/$DOM.conf -N 5 -D $TMPDNS - &>/dev/null40 #grep -h " $DOM$" $ACCESSLOG | /usr/bin/webalizer -c $CACHEDIR/$DOM.conf -N 5 -D $TMPDNS - &>/dev/null 41 41 # second run: process the stats 42 /usr/ bin/webalizer -c $CACHEDIR/$DOM.conf -N 0 -D $TMPDNS - 2>/dev/null43 read LANGDOM42 /usr/lib/cgi-bin/awstats.pl -config=$DOM 43 read DOM 44 44 done 45 45 } … … 48 48 rm -rf $CACHEDIR/* 49 49 # Fill the cache dir 50 /usr/lib/alternc/ webalizer.cache.php50 /usr/lib/alternc/awstats.cache.php 51 51 52 52 # Launch the stat 53 mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" -B -e "SELECT lang,hostname FROM stats" |grep -v "^lang" | dostat53 mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" -B -e "SELECT hostname FROM aws" |grep -v "^hostname" | dostat 54 54 55 55 cleanup -
trunk/awstats.template.conf
r1030 r1035 34 34 # Example: "C:/WINNT/system32/LogFiles/W3SVC1/ex%YY-24%MM-24%DD-24.log" 35 35 # 36 LogFile="/ tmp/awstats.log"36 LogFile="/var/log/apache/access.log" 37 37 38 38 # Put here your log format (Must match your web server config. See setup … … 170 170 # Default: 0 171 171 # 172 AllowAccessFromWebToAuthenticatedUsersOnly= 1172 AllowAccessFromWebToAuthenticatedUsersOnly=0 173 173 174 174 # This parameter give the list of all authorized authenticated users to view -
trunk/bureau/admin/aws_list.php
r1034 r1035 82 82 </table> 83 83 </form> 84 84 <?php 85 85 } 86 86 -
trunk/bureau/admin/menu_awstats.php
r1030 r1035 30 30 31 31 /* ############# STATS ############# */ 32 $q=$quota->getquota(" stats");32 $q=$quota->getquota("aws"); 33 33 $r=$quota->getquota("dom"); 34 34 if ($q["t"]>0 && $r["u"]>0) { 35 35 ?> 36 36 <tr><td nowrap="nowrap"> 37 <a href=" sta_list.php"><?php __("Web Statistics"); ?></a><br />37 <a href="aws_list.php"><?php __("Web Statistics"); ?></a><br /> 38 38 </td></tr> 39 39 <?php } ?> -
trunk/bureau/class/m_aws.php
r1034 r1035 464 464 $users=""; 465 465 while ($db->next_record()) { 466 $users.=$db-> ("login")." ";467 } 468 $s=str_replace("% HOSTNAME%",$hostname,$s);469 $s=str_replace("% USERS%",$users,$s);470 $f=fopen($this->CONFDIR."/awstats.".$ db->f("hostname").".conf","wb");466 $users.=$db->f("login")." "; 467 } 468 $s=str_replace("%%HOSTNAME%%",$hostname,$s); 469 $s=str_replace("%%USERS%%",$users,$s); 470 $f=fopen($this->CONFDIR."/awstats.".$hostname.".conf","wb"); 471 471 fputs($f,$s,strlen($s)); 472 472 fclose($f);
Note: See TracChangeset
for help on using the changeset viewer.
