X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?p=dovecot-cn.git;a=blobdiff_plain;f=debian%2Fpostinst;h=0b0086bb218b84c3ead90049eadc076f26446d0c;hp=dd1bf13ddad709aed8e6ba5a18b396a015cd6008;hb=HEAD;hpb=61e2c36a2ade8df3ec5239ba9c069e14e64f0b56 diff --git a/debian/postinst b/debian/postinst index dd1bf13..0b0086b 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,4 +1,6 @@ -#!/bin/sh -e +#!/bin/sh + +set -e [ "$1" = "configure" ] || exit 0 [ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx @@ -6,6 +8,40 @@ # Load CARNet Tools . /usr/share/carnet-tools/functions.sh + +move_certs() { + if [ -f /etc/dovecot/private/dovecot.pem -a ! -f /etc/dovecot/private/dovecot.key ]; then + mv -f /etc/dovecot/private/dovecot.pem /etc/dovecot/private/dovecot.key || true + fi + + if [ -f /etc/dovecot/dovecot.pem ]; then + mv -f /etc/dovecot/dovecot.pem /etc/dovecot/private/dovecot.pem || true + fi +} + +put_new_certs() { +# postavlja cert i key na nove putanje iz bustera + cp_check_and_sed '#ssl_key =