a44740182ec94307d606493c5723e6b9baa798cb
[webalizer-cn.git] / debian / postrm
1 #!/bin/sh
2
3 set -e
4
5 PKG="webalizer-cn"
6
7 if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
8     . /usr/share/apache2/apache2-maintscript-helper
9
10     webalizer_enable() {
11         echo "CN: Purging $PKG configuration for Apache2."
12         return 0
13     }
14 else
15     echo "CN: Could not load Apache 2.4 maintainer script helper."
16
17     webalizer_enable() {
18         return 1
19     }
20 fi
21
22 webalizer_error() {
23     echo "CN: Error while trying to purge $PKG configuration for Apache2."
24 }
25
26 if [ "$1" = "abort-install" ] || [ "$1" = "abort-upgrade" ]; then
27     conffile=/etc/apache2/conf.d/$PKG.conf
28
29     if [ -e "$conffile.dpkg-remove" ]; then
30         echo "CN: Reinstalling $conffile that was moved away."
31         mv "$conffile.dpkg-remove" "$conffile"
32     fi
33 fi
34
35 #DEBHELPER#
36
37 exit 0