diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:47:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:47:27 +0000 |
commit | d5eb37dd4a5a433c40c3c1e7ead424add62663f8 (patch) | |
tree | 6a18289cb463d11227d1fa4c990548e50a09d917 /debian/exim4-daemon-light.postinst | |
parent | Adding upstream version 4.92. (diff) | |
download | exim4-d5eb37dd4a5a433c40c3c1e7ead424add62663f8.tar.xz exim4-d5eb37dd4a5a433c40c3c1e7ead424add62663f8.zip |
Adding debian version 4.92-8+deb10u6.debian/4.92-8+deb10u6debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | debian/exim4-daemon-light.postinst | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/debian/exim4-daemon-light.postinst b/debian/exim4-daemon-light.postinst new file mode 100644 index 0000000..4a2e108 --- /dev/null +++ b/debian/exim4-daemon-light.postinst @@ -0,0 +1,60 @@ +#!/bin/sh + +set -e + +. /usr/share/debconf/confmodule + +if [ -n "$EX4DEBUG" ]; then + echo "now debugging $0 $@" + set -x +fi + +dc_eximconfig_configtype="other" +db_get exim4/dc_eximconfig_configtype || true +if [ "$RET" = "no configuration at this time" ]; then + dc_eximconfig_configtype="none" +fi + +case "$1" in + configure) + + # || true is needed for succesfull installation with configtype 'none' + if [ -x /etc/init.d/exim4 ]; then + db_stop + if [ "$dc_eximconfig_configtype" = "none" ]; then + # we may have broken config here, ignore errors + invoke-rc.d exim4 start || true + else + # we must have working config here, honor errors + invoke-rc.d exim4 start + fi + fi + + # set up DH-parameter file, update if older than 160 days + if test -e /var/spool/exim4/gnutls-params-2048 ; then + if [ `stat --format=%Y /var/spool/exim4/gnutls-params-2048` -le $(( `date +%s` - 13824000 )) ]; + then + echo "Updating GnuTLS DH parameter file" 1>&2 + /usr/share/exim4/exim4_refresh_gnutls-params + fi + else + echo "Initializing GnuTLS DH parameter file" 1>&2 + tempgnutls=$(tempfile --directory /var/spool/exim4 --mode 644 --prefix "gnutp") + chown Debian-exim:Debian-exim $tempgnutls + if which certtool > /dev/null 2>&1 && \ + timeout --preserve-status --kill-after=15 120 \ + certtool --generate-dh-params --bits 2048 > $tempgnutls ; then + mv $tempgnutls /var/spool/exim4/gnutls-params-2048 + else + rm -f $tempgnutls + install -m 644 -o Debian-exim -g Debian-exim \ + /usr/share/exim4/gnutls-params-2048 \ + /var/spool/exim4/gnutls-params-2048 + fi + fi + + + ;; +esac + +#DEBHELPER# |