diff --git a/src/freedombone-base-email b/src/freedombone-base-email index 8d0ac56d..791880b8 100755 --- a/src/freedombone-base-email +++ b/src/freedombone-base-email @@ -74,6 +74,11 @@ REFRESH_GPG_KEYS_HOURS=2 exim_version='4.89' function rebuild_exim_with_socks { + exim_socks_installed=$(get_completion_param "exim_socks") + if [[ "$exim_socks_installed" == 'true' ]]; then + return + fi + # shellcheck disable=SC2154 if [ ! -d "$INSTALL_DIR" ]; then mkdir -p "$INSTALL_DIR/exim4" @@ -156,6 +161,17 @@ function rebuild_exim_with_socks { dpkg -i exim4_${exim_version}_all.deb apt-mark -q hold exim4 apt-get -yq remove --purge at + + systemctl restart exim4 + if [[ $(systemctl is-active exim4) != 'active' ]]; then + apt-mark -q unhold exim4 + apt-get -yq install exim4 --reinstall + systemctl restart exim4 + fi + + rm -rf "$INSTALL_DIR/exim4" + + set_completion_param "exim_socks" "true" } function email_create_template { diff --git a/src/freedombone-upgrade b/src/freedombone-upgrade index 9f7d4651..1efca9b0 100755 --- a/src/freedombone-upgrade +++ b/src/freedombone-upgrade @@ -92,6 +92,7 @@ if [ -d "$PROJECT_DIR" ]; then exit 453536 fi + rebuild_exim_with_socks apt-get -yq -t stretch-backports install certbot email_install_tls email_disable_chunking