#!/bin/sh set -e case "$1" in remove) if [ -e /etc/apache2/apache2.conf -a -e /etc/apache2/mods-enabled/php5.load ]; then # set a flag to remember the original state # useful when reinstalling the same version. touch /etc/php5/apache2/.start fi a2dismod php5 || true ;; esac exit 0