* added patches from Fathi boudra
[citadel.git] / citadel / debian / citadel-server.postrm
1 #! /bin/sh
2 . /usr/share/debconf/confmodule
3 set -e
4
5 db_version 2.0
6
7 case "$1" in
8   remove)
9     ;;
10   purge)
11         rmdir "/etc/citadel/help"
12         rmdir "/etc/citadel/messages"
13
14     # we mimic dpkg as closely as possible, so we remove configuration
15     # files with dpkg backup extensions too:
16     ### Some of the following is from Tore Anderson:
17     for ext in '~' '%' .bak .dpkg-tmp .dpkg-new .dpkg-old .dpkg-dist;  do
18                 rm -f /etc/citadel/*$ext
19                 rm -f /etc/citadel/messages/*$ext
20                 rm -f /etc/citadel/help/*$ext
21     done
22         echo "/var/lib/citadel/data not removed, as it may contain your personal data."
23         db_purge
24         db_go
25         ;;
26   disappear|upgrade|failed-upgrade|abort-install|abort-upgrade)
27     ;;
28   *) echo "$0: didn't understand being called with \`$1'" 1>&2
29      exit 1;;
30 esac
31
32 exit 0