#!/bin/sh

set -e

purge_conffile()
{
  if [ -x /usr/bin/ucf ]; then
    ucf --purge $1
  fi
  rm -f $1 $1.dpkg-* $1.ucf-*
}

. /usr/share/debconf/confmodule

if [ "$1" = purge ]; then
  purge_conffile /etc/apache2/conf.d/otrs2
fi

#DEBHELPER#

if [ "$1" = purge ]; then
  db_stop
  if [ -f /etc/init.d/apache2 ]; then
    invoke-rc.d apache2 reload
  fi
fi
