#!/bin/sh # preinst script for pepito # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `install' # * `install' # * `upgrade' # * `abort-upgrade' # for details, see https://www.debian.org/doc/debian-policy/ or # the debian-policy package case "$1" in install) ;; upgrade) if dpkg --compare-versions "$2" lt 0.1; then RC=0 grep "lliurex-location" /etc/apache2/sites-enabled/000-default.conf 1>/dev/null 2>/dev/null || RC=1 if [ $RC = 0 ]; then if [ ! -h "/etc/apache2/mods-enabled/proxy.conf" -o ! -h "/etc/apache2/mods-enabled/proxy.load" ]; then echo "Fixing proxy module in Apache2 Service....." a2enmod proxy_http >/dev/null || true service apache2 restart fi if [ ! -h "/etc/apache2/mods-enabled/proxy_html.conf" -o ! -h "/etc/apache2/mods-enabled/proxy_html.load" ]; then echo "Fixing proxy module in Apache2 Service....." a2enmod proxy_html >/dev/null || true service apache2 restart fi fi fi ;; abort-upgrade) ;; *) echo "preinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0