Ignore:
Timestamp:
10/07/08 19:21:18 (5 years ago)
Author:
anarcat
Message:

move the apache config code into alternc.install

this makes sure that apache is properly restarted after install and factors code out of the two postinst files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • alternc/trunk/install/alternc.install

    r2328 r2336  
    189189    echo "LoadModule ${php}_module /usr/lib/apache/1.3/lib${php}.so" | append_no_dupe /etc/apache/modules.conf 
    190190    echo "LoadModule ${php}_module /usr/lib/apache/1.3/lib${php}.so" | append_no_dupe /etc/apache-ssl/modules.conf 
     191 
     192    if [ ! -h /etc/apache-ssl/conf.d/alternc.conf ] && [ -e /etc/apache-ssl/conf.d/ ]; then 
     193            ln -sf /etc/alternc/apache-ssl.conf /etc/apache-ssl/conf.d/alternc.conf 
     194    fi 
     195 
     196    if [ ! -h /etc/apache/conf.d/alternc.conf ] && [ -e /etc/apache/conf.d/ ]; then 
     197            ln -sf /etc/alternc/apache.conf /etc/apache/conf.d/alternc.conf 
     198    fi 
     199 
     200    if [ ! -h /etc/apache/conf.d/override_php.conf ] && [ -e /etc/apache/conf.d/ ]; then 
     201            ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache/conf.d/override_php.conf 
     202    fi 
    191203    SERVICES="$SERVICES apache apache-ssl" 
    192204fi 
    193 if [ -x /usr/sbin/apache2 ] &&  ! ( [ -L /etc/apache2/mods-enabled/vhost_alias.load ] && [ -L /etc/apache2/mods-enabled/$php.load ] ) 
    194 then 
    195     a2enmod vhost_alias 
    196     a2enmod $php 
    197     SERVICES="$SERVICES apache2" 
     205if [ -x /usr/sbin/apache2 ]; then 
     206    s="" 
     207    if ! ( [ -L /etc/apache2/mods-enabled/vhost_alias.load ] && [ -L /etc/apache2/mods-enabled/$php.load ] ) 
     208    then 
     209        a2enmod vhost_alias 
     210        a2enmod $php 
     211        s="apache2" 
     212    fi  
     213    if [ ! -h /etc/apache2/conf.d/alternc.conf ] && [ -e /etc/apache2/conf.d/ ]; then 
     214        ln -sf /etc/alternc/apache2.conf /etc/apache2/conf.d/alternc.conf 
     215        s="apache2" 
     216    fi 
     217    if [ ! -h /etc/apache2/conf.d/override_php.conf ] && [ -e /etc/apache2/conf.d/ ]; then 
     218        ln -sf /var/alternc/apacheconf/override_php.conf /etc/apache2/conf.d/override_php.conf 
     219        s="apache2" 
     220    fi 
     221    SERVICES="$SERVICES $s" 
    198222fi 
    199223 
Note: See TracChangeset for help on using the changeset viewer.