Ticket #1121: redesign_mysql_webalizer.patch
| File redesign_mysql_webalizer.patch, 2.0 kB (added by anonyme, 5 months ago) |
|---|
-
debian/postinst
old new 22 22 configure) 23 23 24 24 # 1st, configure the table if required 25 mysql - h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE"</usr/share/alternc/webalizer.sql || true25 mysql --defaults-file=/etc/alternc/my.cnf </usr/share/alternc/webalizer.sql || true 26 26 27 27 # Then, configure the quota for "stats" 28 28 db_get alternc-webalizer/default_quota_value || true -
debian/postrm
old new 16 16 /usr/lib/alternc/quota_delete stats || true 17 17 if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then 18 18 . "$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;" 21 20 fi 22 21 rm -rf /var/cache/webalizer 23 22 ;; -
alternc-webalizer
old new 1 1 #!/bin/sh 2 . /etc/alternc/local.sh3 2 4 3 if [ -e /etc/alternc/webalizer.conf ] 5 4 then … … 11 10 ACCESSLOG="/var/log/apache/access.log.1" 12 11 fi 13 12 14 if [ -z "$MYSQL_HOST" ]15 then16 MYSQL_HOST="localhost"17 fi18 19 13 CACHEDIR="/var/cache/alternc-webalizer" 20 14 DNSCACHE="/var/cache/alternc-webalizer/.dns.cache" 21 15 TMPLOG=`mktemp -p /tmp` … … 53 47 /usr/lib/alternc/webalizer.cache.php 54 48 55 49 # 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" | dostat50 mysql --defaults-file=/etc/alternc/my.cnf -B -e "SELECT lang,hostname,dir,uid FROM stats" |grep -v "^lang" | dostat 57 51 58 52 cleanup
