Changeset 1221


Ignore:
Timestamp:
Apr 19, 2016, 2:56:43 PM (3 years ago)
Author:
mabarracus
Message:

doing rules

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

Legend:

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

    r1220 r1221  
    1111Package: php5-lliurex-compat
    1212Architecture: any
     13Pre-Depends: apache2, libapache2-lliurex-mod-php5
    1314Depends: ${shlibs:Depends}, ${misc:Depends}
    1415Description: lliurex-php5 compatibility mode to allow running apache2 with php5 in xenial
  • php5-lliurex-compat/fuentes/debian/postinst

    r1220 r1221  
    1717# for details, see https://www.debian.org/doc/debian-policy/ or
    1818# the debian-policy package
    19 
     19function setup_apache(){
     20    if [ ! -f /usr/share/doc/apache2/examples/setup-instance ]; then
     21        echo "ERROR: setup-instance from apache2 not found !!!"
     22        exit 1
     23    fi
     24    /usr/share/doc/apache2/examples/setup-instance lliurex
     25}
     26function change_ports(){
     27    if [ ! -d /etc/apache2-lliurex ]; then
     28        echo "ERROR: /etc/apache2-lliurex not found !!!"
     29        exit 1
     30    fi
     31    sed -i -r 's/80/800/g' /etc/apache2-lliurex/ports.conf
     32    sed -i -r 's/443/4430/g' /etc/apache2-lliurex/ports.conf
     33    for site in /etc/apache2-lliurex/sites-available/*.conf; do
     34        sed -i -r 's/\*:80/\*:800/g' ${site}
     35        sed -i -r 's/\*:443/\*:4430/g' ${site}
     36    done;
     37}
     38function fix_mods(){
     39    a2dismod-lliurex php7.0 || true
     40    a2dismod php5 || true
     41    if [ -f /etc/apache2-lliurex/mods-available/php7.0.conf ]; then
     42        mv /etc/apache2-lliurex/mods-available/php7.0.conf /etc/apache2-lliurex/mods-available/php7.0.conf.disabled
     43    fi
     44    if [ -f /etc/apache2-lliurex/mods-available/php7.0.load ]; then
     45        mv /etc/apache2-lliurex/mods-available/php7.0.load /etc/apache2-lliurex/mods-available/php7.0.load.disabled
     46    fi
     47    if [ -f /etc/apache2/mods-available/php5.conf ]; then
     48        mv /etc/apache2/mods-available/php5.conf /etc/apache2-lliurex/mods-available/php5.conf.disabled
     49    fi
     50    if [ -f /etc/apache2/mods-available/php5.load ]; then
     51        mv /etc/apache2/mods-available/php5.load /etc/apache2-lliurex/mods-available/php5.load.disabled
     52    fi
     53}
    2054
    2155case "$1" in
    2256    configure)
     57        setup_apache
     58        change_ports
     59        fix_mods
     60        systemctl enable apache2-lliurex
     61        systemctl restart apache2-lliurex
     62        systemctl restart apache2
    2363    ;;
    2464
Note: See TracChangeset for help on using the changeset viewer.