X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fprerm;h=f756ca331d24b5949f175f33482c76148c09fd78;hb=HEAD;hp=3a25577d801e0778725982a3b4794ea3a364bba1;hpb=caea717ad3441e9f4da8a4112a685ec28066fe4f;p=amavisd-cn.git diff --git a/debian/prerm b/debian/prerm index 3a25577..593de7a 100755 --- a/debian/prerm +++ b/debian/prerm @@ -1,60 +1,55 @@ #!/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 -MAILDIR=/etc/mail ALIASES=/etc/aliases -sendmail_cf=$MAILDIR/sendmail.cf -sendmail_mc=$MAILDIR/sendmail.mc -submit_mc=$MAILDIR/submit.mc -ct_file=$MAILDIR/trusted-users 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 - # sendmail? - if grep -q $PKG $sendmail_mc $submit_mc 2>&- || \ - grep -q '^amavis$' $ct_file 2>&- ; then - echo "Removing sendmail configuration for ${PKG}... " - cp-update -r -c dnl $PKG $sendmail_mc >&- - cp-update -r -c dnl $PKG $submit_mc >&- - grep -v '^amavis$' $ct_file > ${ct_file}.dpkg-tmp.$$ || true - cp_mv ${ct_file}.dpkg-tmp.$$ $ct_file - make -C /etc/mail 2>&1 | grep -v 'issue .*/etc/init.d/sendmail reload' 1>&2 || true - echo "Removed sendmail configuration for ${PKG}." - if pgrep -u root -f 'sendmail: MTA: accepting connections' >&- ; then - /etc/init.d/sendmail reload - if ! pgrep -u root -f 'sendmail: MTA: accepting connections' >&- ; then - echo 'CN: Something bad happened to sendmail on reload!' 1>&2 - exit 1 - fi - # Everything went well, apparently. Remove old backup files. - rm -f $sendmail_cf.$PKG - rm -f $sendmail_mc.$PKG - rm -f $submit_mc.$PKG - fi - fi - # postfix? if grep -q $PKG $master_cf; then cp-update -r $PKG $master_cf >&- del_postconf content_filter echo "Removed postfix configuration for ${PKG}." - if pgrep -u root -f /usr/lib/postfix/master >&- && \ - [ -x /etc/init.d/postfix ] >&- ; then - /etc/init.d/postfix restart - fi + service postfix restart fi cp-update -r $PKG $ALIASES >&- - if [ -x /usr/bin/newaliases ]; then - newaliases - fi + newaliases fi + +exit 0 + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER#