#!/bin/sh -e # postinst for t-prot # Source debconf library. if [ -e /usr/share/debconf/confmodule ]; then . /usr/share/debconf/confmodule fi if [ "$1" != 'configure' ] && [ "$1" != 'reconfigure' ]; then exit 0 fi # change existing symlink from ../Muttrc.t-prot to ../t-prot/Mutrc if [ "$2" = "2.1-1" ] && [ -L /etc/Muttrc.d/t-prot.rc ]; then cd /etc/Muttrc.d && ln -sf ../t-prot/Muttrc t-prot.rc || true fi # only on new install or reconfigure if [ "x$2" = "x" ] || [ "$1" = "reconfigure" ] || [ "${DEBCONF_RECONFIGURE}" = "1" ]; then symlink=true if [ -e /usr/share/debconf/confmodule ]; then db_get t-prot/muttrc.d symlink="$RET" fi case "$symlink" in true) mkdir /etc/Muttrc.d 2> /dev/null || true cd /etc/Muttrc.d && ln -sf ../t-prot/Muttrc t-prot.rc || true ;; false) if [ -L /etc/Muttrc.d/t-prot.rc ]; then rm /etc/Muttrc.d/t-prot.rc rmdir /etc/Muttrc.d 2> /dev/null || true fi ;; esac fi