Changeset 2164

Show
Ignore:
Timestamp:
04/23/08 23:11:02 (3 weeks ago)
Author:
engelaere
Message:

Utilisation du fichier /etc/alternc/my.cnf

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • alternc-awstats/trunk/debian/postinst

    r2161 r2164  
    2828#     fi 
    2929# } 
    30 # Configure logrotate.d/apache to create log owned by group www-data :  
     30# Configure logrotate.d/apache to create log owned by group www-data : 
    3131function logrotate_apache { 
    3232        cp -a -f $APACHEROTATE $APACHEROTATE.tmp 
    33         sed -e 's/create 640 root adm/create 640 root www-data/' < $APACHEROTATE > $APACHEROTATE.tmp  
     33        sed -e 's/create 640 root adm/create 640 root www-data/' < $APACHEROTATE > $APACHEROTATE.tmp 
    3434        mv -f $APACHEROTATE.tmp $APACHEROTATE 
    3535} 
     
    4646 
    4747    echo "Installing mysql table" 
    48     mysql -h"$MYSQL_HOST" -p"$MYSQL_PASS" -u"$MYSQL_USER" "$MYSQL_DATABASE"
     48    mysql --defaults-file=/etc/alternc/my.cnf
    4949        </usr/share/alternc/awstats.sql || true 
    50      
     50 
    5151    # Refresh apache configuration 
    5252    # configure /etc/alternc/templates/apache/httpd.conf 
     
    6262            cat > $LOGAPACHE <<EOF 
    6363LogFile="/var/log/apache/access.log" 
     64LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot %other %virtualname" 
    6465EOF 
    6566            chown www-data:www-data $LOGAPACHE 
     
    7778            cat > $LOGAPACHE <<EOF 
    7879LogFile="/var/log/apache2/access.log" 
     80LogFormat="%host %other %logname %time1 %methodurl %code %bytesd %refererquot %uaquot" 
    7981EOF 
    8082            chown www-data:www-data $LOGAPACHE 
     
    98100    /usr/share/alternc/install/dopo.sh 
    99101 
    100     # Add htpasswd :  
     102    # Add htpasswd : 
    101103    touch /etc/alternc/awstats.htpasswd 
    102104    chown www-data /etc/alternc/awstats.htpasswd /etc/awstats 
    103     chmod 644 /etc/alternc/awstats.htpasswd  
     105    chmod 644 /etc/alternc/awstats.htpasswd 
    104106    chmod 755 /etc/awstats 
    105107    mkdir -p /var/cache/awstats 
    106108    chown www-data:www-data /var/cache/awstats 
    107109 
    108     # ADD menu item :  
     110    # ADD menu item : 
    109111    if ! grep -q "^menu_aws.php$" "$MENUFILE"; then 
    110112        rm -f $MENUFILE.alternc_awstats 
  • alternc-awstats/trunk/debian/postrm

    r2161 r2164  
    1111#           grep -v "   Include \"\/etc\/apache\/alternc-awstats.conf\"/" \ 
    1212#           > $1.alternc_awstats 
    13 #       mv -f $1.alternc_awstats $1  
     13#       mv -f $1.alternc_awstats $1 
    1414#     fi 
    1515# } 
     
    3232    if [ -e "$CONFIGFILE" -a -x "/usr/bin/mysql" ]; then 
    3333        . "$CONFIGFILE" 
    34         mysql -f -u"$MYSQL_USER" -p"$MYSQL_PASS" -h"$MYSQL_HOST"
     34        mysql -f --defaults-file=/etc/alternc/my.cnf
    3535              "$MYSQL_DATABASE" -e "DROP TABLE IF EXISTS aws,aws_users,aws_access;" 
    3636    fi 
    37     rm -rf /var/cache/awstats  
     37    rm -rf /var/cache/awstats 
    3838    rm -f /etc/alternc/awstats.htpasswd 
    3939    rm -f /etc/alternc/alterncawstats.conf \