Ticket #1121: redesign_mysql_webalizer.patch

File redesign_mysql_webalizer.patch, 2.0 kB (added by anonyme, 5 months ago)
  • debian/postinst

    old new  
    2222configure) 
    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" 
    2828    db_get alternc-webalizer/default_quota_value || true 
  • debian/postrm

    old new  
    1616    /usr/lib/alternc/quota_delete stats || true  
    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 
    2322    ;; 
  • alternc-webalizer

    old new  
    11#!/bin/sh 
    2 . /etc/alternc/local.sh 
    32 
    43if [ -e /etc/alternc/webalizer.conf ] 
    54then 
     
    1110    ACCESSLOG="/var/log/apache/access.log.1" 
    1211fi 
    1312 
    14 if [ -z "$MYSQL_HOST" ]  
    15 then 
    16     MYSQL_HOST="localhost" 
    17 fi 
    18  
    1913CACHEDIR="/var/cache/alternc-webalizer" 
    2014DNSCACHE="/var/cache/alternc-webalizer/.dns.cache" 
    2115TMPLOG=`mktemp -p /tmp` 
     
    5347/usr/lib/alternc/webalizer.cache.php 
    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