]> git.deb.at Git - pkg/abook.git/blob - debian/postrm
Imported Debian patch 0.5.6-7
[pkg/abook.git] / debian / postrm
1 #!/bin/sh -e
2 # postrm for abook
3 # copyright 2003-2009 by Gerfried Fuchs <rhonda@debian.at>
4 # Licenced under BSD style
5
6 if [ -x "`which update-menus 2>/dev/null`" ]; then
7         update-menus
8 fi
9
10 action=$1
11
12 case "$action" in
13     remove)
14         if [ ! -e /etc/Muttrc.d/abook.rc.removed ]; then
15                 # only disable the config snippet
16                 mv /etc/Muttrc.d/abook.rc /etc/Muttrc.d/abook.rc.removed || true
17         fi
18         ;;
19     purge)
20         rm /etc/Muttrc.d/abook.rc.removed 2> /dev/null || true
21         rm /etc/Muttrc.d/abook.rc 2> /dev/null || true
22         rmdir /etc/Muttrc.d 2> /dev/null || true
23         # remove debconf data on purge
24         if [ -e /usr/share/debconf/confmodule ]; then
25                 . /usr/share/debconf/confmodule
26                 db_purge
27         fi
28         ;;
29 esac