X-Git-Url: https://git.deb.at/w?a=blobdiff_plain;f=debian%2Fpostrm;h=1fe8e4253192086d5e766b15638ba6bb26e4f690;hb=ea1861c197b63523f945dbfc8c41ba3c53a8e49c;hp=e0a453e0ea28785a47705f42979224477753c52f;hpb=ebce048d2bb94d717b46f34b02ed1720aaa8aaee;p=pkg%2Ft-prot.git diff --git a/debian/postrm b/debian/postrm index e0a453e..1fe8e42 100644 --- a/debian/postrm +++ b/debian/postrm @@ -1,7 +1,23 @@ #!/bin/sh -e # postrm for t-prot -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/t-prot.rc.removed ]; then + # only disable the configuration + mv /etc/Muttrc.d/t-prot.rc /etc/Muttrc.d/t-prot.rc.removed || true + fi + ;; + purge) + rm /etc/Muttrc.d/t-prot.rc.removed || true + rm /etc/Muttrc.d/t-prot.rc || 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