Changeset 1472


Ignore:
Timestamp:
May 11, 2016, 10:31:40 AM (3 years ago)
Author:
mabarracus
Message:

Improved detection to avoid configure multi-sites twice

Location:
php5-lliurex-compat/fuentes/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • php5-lliurex-compat/fuentes/debian/changelog

    r1244 r1472  
     1php5-lliurex-compat (0.5-1) xenial; urgency=medium
     2
     3  * Improved detection to avoid configure multi-sites twice
     4
     5 -- M.Angel Juan <m.angel.juan@gmail.com>  Wed, 11 May 2016 10:30:28 +0200
     6
    17php5-lliurex-compat (0.5) xenial; urgency=medium
    28
  • php5-lliurex-compat/fuentes/debian/postinst

    r1243 r1472  
    3838    sed -i -r 's/443/4430/g' /etc/apache2-lliurex/ports.conf
    3939    for site in /etc/apache2-lliurex/sites-available/*.conf; do
    40         sed -i -r 's/\*:80/\*:800/g' ${site}
    41         sed -i -r 's/\*:443/\*:4430/g' ${site}
     40        tst80=$(egrep ':80' ${site}|wc -l)
     41        tst443=$(egrep ':443' ${site}|wc -l)
     42        if [ ${tst80} -ne 0 ]; then
     43            echo "Fixing port 80 in site: " ${site}
     44            sed -i -r 's/\*:80/\*:800/g' ${site}
     45        fi
     46        if [ ${tst443} -ne 0 ]; then
     47            echo "Fixing port 443 in site: " ${site}
     48            sed -i -r 's/\*:443/\*:4430/g' ${site}
     49        fi
    4250    done;
    4351}
     
    4856    echo "Using: ${DISMOD_LLIUREX} & ${DISMOD}"
    4957    if [ -L /etc/apache2-lliurex/mods-enabled/php7.0.load ]; then
     58        echo "Disabling php7 into apache2-lliurex instance"
    5059        ${DISMOD_LLIUREX} php7.0
    5160    fi
    5261    if [ -L /etc/apache2/mods-enabled/php5.load ]; then
     62        echo "Disabling php5 into apache2 instance"
    5363        ${DISMOD} php5
    5464    fi
     
    6979case "$1" in
    7080    configure)
    71         setup_apache
     81        if [ -d /etc/apache2-lliurex ]; then
     82            echo "Apache2 multi-instance seems already configured, skipping multi-instance configuration"
     83        else
     84            setup_apache
     85        fi
    7286        change_ports
    7387        fix_mods
     88        echo "Enabling multi-site services"
    7489        systemctl enable apache2-lliurex
    7590        systemctl daemon-reload
Note: See TracChangeset for help on using the changeset viewer.