#!/bin/sh set -e # COMMON VARIABLES APACHE_PATH="/etc/apache2/" PACKAGE_NAME="n4d-apache" ORIGINAL_FILE=$APACHE_PATH"sites-available/000-default.conf" DIVERT_FILE=$APACHE_PATH"sites-available/000-default.orig" LLIUREX_FILE=$APACHE_PATH"sites-available/llx-default.conf" SYM_LINK="/var/www/share" case $1 in configure) if [ ! -r ${DIVERT_FILE} ] ; then dpkg-divert --package ${PACKAGE_NAME} --rename --quiet --add --divert ${DIVERT_FILE} ${ORIGINAL_FILE} ln -fs ${LLIUREX_FILE} ${ORIGINAL_FILE} fi if [ ! -L ${SYM_LINK} ] ; then ln -s /net/server-sync/share $SYM_LINK if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke ensite share fi fi if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then . /usr/share/apache2/apache2-maintscript-helper apache2_invoke enconf n4d-apache.conf apache2_invoke enmod php7.2 fi systemctl restart apache2 ;; *) echo "[DEBUG] Unknow action ..." ;; esac #DEBHELPER# exit 0