X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=blobdiff_plain;f=debian%2Fpostinst;h=b9202d111a5745b6947f5175bd9bed962c0585dc;hb=38d9a6700d7248f523c8c9d056f1470f99eb7eef;hp=0d7655889c0577efe842a50295b48ebb268c25ac;hpb=3223eab926b22668ca52e098575cc3927435dd1d;p=dovecot-cn.git diff --git a/debian/postinst b/debian/postinst index 0d76558..b9202d1 100755 --- a/debian/postinst +++ b/debian/postinst @@ -1,35 +1,201 @@ -#!/bin/sh -e +#!/bin/sh + +set -e [ "$1" = "configure" ] || exit 0 +[ "$DEBIAN_SCRIPT_DEBUG" ] && set -vx # Load CARNet Tools . /usr/share/carnet-tools/functions.sh -cp_check_and_sed '^protocols' \ - 's/protocols.*$/protocols = imap imaps pop3 pop3s/g' \ - /etc/dovecot/dovecot.conf || true +function 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 +} + +function put_new_certs() { +# postavlja cert i key na nove putanje iz bustera + cp_check_and_sed '#ssl_key =