X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Fpostrm;h=27b19f39ed02f24a8c1d6914a15c6b816418653c;hb=164f01980d95716813f82df6c32135fddbe2cce4;hp=d388fb4c268242df150c36811b30089a70c5f401;hpb=0dd1d38a222a5e2e95879ab2397a83d4108d3379;p=pkg%2Fabook.git diff --git a/debian/postrm b/debian/postrm index d388fb4..27b19f3 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,11 +1,31 @@ -#!/bin/sh -e +#!/bin/sh # postrm for abook +# copyright 2003-2012 by Gerfried Fuchs +# Licenced under WTFPLv2 + +set -e if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus fi -if [ "$1" = 'purge' -a -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