X-Git-Url: https://git.deb.at/?a=blobdiff_plain;ds=sidebyside;f=debian%2Fpostrm;h=f45490ee1fe77d974bd58a93ab53c8ccd090c290;hb=03f9ed0d7defd9030b896b4761849432650d1959;hp=e6df067bf5f4be8c45ef4bae969fbaddd4d2e36d;hpb=6254d62ebd44b79316891a4ee45cb67cbe98cba4;p=pkg%2Fabook.git diff --git a/debian/postrm b/debian/postrm index e6df067..f45490e 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,11 +1,29 @@ #!/bin/sh -e # postrm for abook +# copyright 2003-2008 by Gerfried Fuchs +# Licenced the same way as abook itself if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi -if [ "$1" = 'purge' ] && [ -e /usr/share/debconf/confmodule ]; then - . /usr/share/debconf/confmodule - db_purge -fi +action=$1 + +case "$action" in + remove) + if [ ! -e /etc/Muttrc.d/abook.rc.removed ]; then + # only disable the config snippet + mv /etc/Muttrc.d/abook.rc /etc/Muttrc.d/abook.rc.removed || true + fi + ;; + purge) + rm /etc/Muttrc.d/abook.rc.removed 2> /dev/null || true + rm /etc/Muttrc.d/abook.rc 2> /dev/null || true + rmdir /etc/Muttrc.d 2> /dev/null || true + # remove debconf data on purge + if [ -e /usr/share/debconf/confmodule ]; then + . /usr/share/debconf/confmodule + db_purge + fi + ;; +esac