rebuild exim on upgrades

This commit is contained in:
Bob Mottram 2018-03-28 12:57:26 +01:00
parent 94261c874e
commit 854e1db224
2 changed files with 17 additions and 0 deletions

View File

@ -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 {

View File

@ -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