#!/bin/sh # prerm script for amavisd-cn # # see: dh_installdeb(1) set -e # summary of how this script can be called: # * `remove' # * `upgrade' # * `failed-upgrade' # * `remove' `in-favour' # # * `deconfigure' `in-favour' # `removing' # # for details, see http://www.debian.org/doc/debian-policy/ or # the debian-policy package [ "$DEBIAN_SCRIPT_DEBUG" ] && set -x . /usr/share/carnet-tools/functions.sh PKG=amavisd-cn ALIASES=/etc/aliases main_cf=/etc/postfix/main.cf master_cf=/etc/postfix/master.cf ################################## # Ne brisemo nista za bullseye i izlazimo exit 0 ################################## del_postconf() { egrep -v "^$1[[:blank:]]*=[[:blank:]]*" $main_cf > $main_cf.dpkg-tmp.$$ cp_mv $main_cf.dpkg-tmp.$$ $main_cf } if [ "$1" = remove ]; then if grep -q $PKG $master_cf; then cp-update -r $PKG $master_cf >&- del_postconf content_filter echo "Removed postfix configuration for ${PKG}." service postfix restart fi cp-update -r $PKG $ALIASES >&- newaliases fi exit 0 # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER#