Changeset 2170

Show
Ignore:
Timestamp:
04/24/08 17:43:08 (4 months ago)
Author:
anarcat
Message:

follow 0.9.8 changes: use my.cnf to talk to mysql

Closes: #1121

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc-webalizer/trunk/alternc-webalizer

    r1492 r2170  
    11#!/bin/sh 
    2 . /etc/alternc/local.sh 
    32 
    43if [ -e /etc/alternc/webalizer.conf ] 
     
    109then 
    1110    ACCESSLOG="/var/log/apache/access.log.1" 
    12 fi 
    13  
    14 if [ -z "$MYSQL_HOST" ]  
    15 then 
    16     MYSQL_HOST="localhost" 
    1711fi 
    1812 
     
    5448 
    5549# Launch the stat 
    56 mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" -B -e "SELECT lang,hostname,dir,uid FROM stats" |grep -v "^lang" | dostat 
     50mysql --defaults-file=/etc/alternc/my.cnf -B -e "SELECT lang,hostname,dir,uid FROM stats" |grep -v "^lang" | dostat 
    5751 
    5852cleanup 
  • alternc-webalizer/trunk/debian/postinst

    r2141 r2170  
    2323 
    2424    # 1st, configure the table if required 
    25     mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE" </usr/share/alternc/webalizer.sql || true 
     25    mysql --defaults-file=/etc/alternc/my.cnf </usr/share/alternc/webalizer.sql || true 
    2626 
    2727    # Then, configure the quota for "stats" 
  • alternc-webalizer/trunk/debian/postrm

    r1512 r2170  
    1717    if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then 
    1818        . "$CONFIGFILE" 
    19         mysql -f -u"$MYSQL_USER" -p"$MYSQL_PASS" -h"$MYSQL_HOST" \ 
    20               "$MYSQL_DATABASE" -e "DROP TABLE IF EXISTS stats;" 
     19        mysql -f --defaults-file=/etc/alternc/my.cnf -e "DROP TABLE IF EXISTS stats;" 
    2120    fi 
    2221    rm -rf /var/cache/webalizer