Changeset 1579

Show
Ignore:
Timestamp:
05/05/06 11:19:04 (2 years ago)
Author:
pierre-gilles
Message:

Now the awstats's apache specific conf stand in /etc/alternc/ and is linked in /etc/apache*/conf.d/

Files:

Legend:

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

    r1083 r1579  
    1111 
    1212# Add awstats include to the apache configuration file given as argument 
    13 function configure { 
    14     if ! grep -Eq "\*\*\*AWSTATS\*\*\*" $1; then 
    15       cp -a -f $1 $1.tmp 
    16       sed -e "s/\*\*\*ALTERNC_ALIASES\*\*\*/&\\ 
    17           # ***AWSTATS*** \\ 
    18       Include \"\/etc\/apache\/alternc-awstats.conf\"/" < $1 > $1.tmp 
    19       mv -f $1.tmp $1 
    20     fi 
    21 
     13# function configure { 
     14#     if ! grep -Eq "\*\*\*AWSTATS\*\*\*" $1; then 
     15#     cp -a -f $1 $1.tmp 
     16#     sed -e "s/\*\*\*ALTERNC_ALIASES\*\*\*/&\\ 
     17#         # ***AWSTATS*** \\ 
     18#     Include \"\/etc\/apache\/alternc-awstats.conf\"/" < $1 > $1.tmp 
     19#     mv -f $1.tmp $1 
     20#     fi 
     21#
    2222# Configure logrotate.d/apache to create log owned by group www-data :  
    2323function logrotate_apache { 
     
    4242     
    4343    # Refresh apache configuration 
    44     configure /etc/alternc/templates/apache/httpd.conf 
    45     configure /etc/alternc/templates/apache-ssl/httpd.conf 
    46     ln /usr/lib/cgi-bin/awstats.pl /var/alternc/cgi-bin/ -sf  
     44    # configure /etc/alternc/templates/apache/httpd.conf 
     45    # configure /etc/alternc/templates/apache-ssl/httpd.conf 
     46 
     47    if [ ! -h /etc/apache/conf.d/alterncawstats.conf ]; then 
     48        ln -sf /etc/alternc/apacheawstats.conf \ 
     49            /etc/apache/conf.d/alterncawstats.conf 
     50    fi 
     51 
     52    if [ ! -h /etc/apache-ssl/conf.d/alterncawstats.conf ]; then 
     53        ln -sf /etc/alternc/apacheawstats.conf \ 
     54            /etc/apache-ssl/conf.d/alterncawstats.conf 
     55    fi 
     56 
     57     
     58    if [ ! -h /var/alternc/cgi-bin/awstats.pl ]; then 
     59        ln -sf /usr/lib/cgi-bin/awstats.pl \ 
     60            /var/alternc/cgi-bin/awstats.pl 
     61    fi 
    4762    alternc.install 
    4863 
  • alternc-awstats/trunk/debian/postrm

    r1081 r1579  
    55 
    66# Remove awstats include to the apache configuration file given as argument 
    7 function unconfigure { 
    8     if grep -Eqs "\*\*\*AWSTATS\*\*\*" $1; then 
    9       cp -a -f $1 $1.alternc_awstats 
    10       cat $1 | grep -v "\*\*\*MAILMAN\*\*\*" | 
    11           grep -v "   Include \"\/etc\/apache\/alternc-awstats.conf\"/" \ 
    12           > $1.alternc_awstats 
    13       mv -f $1.alternc_awstats $1  
    14     fi 
    15 
     7# function unconfigure { 
     8#     if grep -Eqs "\*\*\*AWSTATS\*\*\*" $1; then 
     9#     cp -a -f $1 $1.alternc_awstats 
     10#     cat $1 | grep -v "\*\*\*MAILMAN\*\*\*" | 
     11#         grep -v "   Include \"\/etc\/apache\/alternc-awstats.conf\"/" \ 
     12#         > $1.alternc_awstats 
     13#     mv -f $1.alternc_awstats $1  
     14#     fi 
     15#
    1616 
    1717case "$1" in 
    1818  remove) 
    1919    # Remove Awstats references from Apache configuration 
    20     unconfigure /etc/alternc/templates/apache/httpd.conf 
    21     unconfigure /etc/alternc/templates/apache-ssl/httpd.conf 
     20    # unconfigure /etc/alternc/templates/apache/httpd.conf 
     21    # unconfigure /etc/alternc/templates/apache-ssl/httpd.conf 
    2222    alternc.install 
    2323 
     
    3636    fi 
    3737    rm -rf /var/cache/awstats  
    38     rm -f /etc/alternc/awstats.htpasswd  
     38    rm -f /etc/alternc/awstats.htpasswd 
     39    rm -f /etc/alternc/alterncawstats.conf \ 
     40        /etc/apache/conf.d/alterncawstats.conf \ 
     41        /etc/apache-ssl/conf.d/alterncawstats.conf 
    3942    ;; 
    4043esac 
  • alternc-awstats/trunk/debian/rules

    r1577 r1579  
    5656        find debian/alternc-awstats/ -depth \( -name CVS -o -name .svn \) -type d -exec rm -rf {} \; 
    5757 
    58         install -m 0644 -g www-data -o www-data alterncawstats.conf debian/alternc-awstats/etc/apache/conf.d
     58        install -m 0644 -g root -o root alterncawstats.conf debian/alternc-awstats/etc/alternc
    5959        install -m 0644 -g www-data -o www-data awstats_alternc.png debian/alternc-awstats/usr/share/awstats/icon/other/ 
    6060        install -m 0755 -g www-data -o www-data alternc-awstats debian/alternc-awstats/usr/lib/alternc/