#!/bin/sh set -e case "$1" in configure) # Recupere le nom de domaine DOMAIN="" if [ -f /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule db_get monsite/domain DOMAIN="$RET" fi # On peut verifier le contenu de debconf avec : # sudo debconf-show monsite [ -z "$DOMAIN" ] && DOMAIN="ipsocloud.com" [ ! -d /etc/ipsocloud ] && mkdir -p /etc/ipsocloud [ -f /etc/ipsocloud/domain.conf ] && rm /etc/ipsocloud/domain.conf cat > /etc/ipsocloud/domain.conf </dev/null 2>&1; then a2enmod headers fi if ! a2query -m rewrite >/dev/null 2>&1; then a2enmod rewrite fi if ! a2query -m ssl >/dev/null 2>&1; then a2enmod ssl fi if ! a2query -m proxy >/dev/null 2>&1; then a2enmod proxy fi if ! a2query -m proxy_http >/dev/null 2>&1; then a2enmod proxy_http fi echo "Active le site web" if ! a2query -s ipsocloud >/dev/null 2>&1; then a2ensite ipsocloud.conf fi # Configuration PHP echo "Configure PHP" for i in /etc/php/*/apache2/php.ini; do if [ -f ${i} ]; then ed -s ${i} <