f0f4aae75ede7c5f9a4e2d4e88942bc9eaf3e8c8
[pkg/t-prot.git] / debian / postrm
1 #!/bin/sh
2 # postrm for t-prot
3 # Copyright 2002-2010 by Rhonda D'Vine <rhonda@debian.org>
4 # Licenced under WTFPLv2
6 set -e
8 action=$1
10 case "$action" in
11     remove)
12         if [ ! -e /etc/Muttrc.d/t-prot.rc.removed ]; then
13                 # only disable the configuration
14                 mv /etc/Muttrc.d/t-prot.rc /etc/Muttrc.d/t-prot.rc.removed || true
15         fi
16         ;;
17     purge)
18         rm /etc/Muttrc.d/t-prot.rc.removed || true
19         rm /etc/Muttrc.d/t-prot.rc || true
20         rmdir /etc/Muttrc.d 2> /dev/null || true
21         # remove debconf data on purge
22         if [ -e /usr/share/debconf/confmodule ]; then
23                 . /usr/share/debconf/confmodule
24                 db_purge
25         fi
26         ;;
27 esac