From: Ian Kelling Date: Tue, 20 Oct 2020 22:56:59 +0000 (-0400) Subject: remove fix for old distro X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=7eabb39979753b818b8537a7a6c47f62f2ae4f39;p=distro-setup remove fix for old distro --- diff --git a/mail-setup b/mail-setup index d3b5691..d1fd81b 100755 --- a/mail-setup +++ b/mail-setup @@ -426,7 +426,7 @@ fi ### begin setup network namespace ### case $HOSTNAME in - $MAIL_HOST) + $MAIL_HOST|bk) reload=false for unit in exim4 spamassassin; do f=/etc/systemd/system/$unit.service.d/nn.conf @@ -476,6 +476,9 @@ esac ### end setup network namespace ### +# 2020-10-19 remove old file. remove this when all hosts updated +rm -fv /etc/systemd/system/spamddnsfix.{timer,service} + case $HOSTNAME in $MAIL_HOST) # per readme.debian @@ -488,35 +491,6 @@ case $HOSTNAME in m systemctl enable spamassassin m systemctl start spamassassin m systemctl reload spamassassin - - cat >/etc/systemd/system/spamddnsfix.service <<'EOF' -[Unit] -Description=spamd dns bug fix cronjob - -[Service] -Type=oneshot -ExecStart=/a/bin/distro-setup/spamd-dns-fix -EOF - # 2017-09, debian closed the bug on this saying upstream had fixed it. - # remove this when i\'m using the newer package, ie, debian 10, or maybe - # ubuntu 18.04. - cat >/etc/systemd/system/spamddnsfix.timer <<'EOF' -[Unit] -Description=run spamd bug fix script every 10 minutes - -[Timer] -OnActiveSec=60 -# the script looks back 9 minutes into the journal, -# it takes a second to run, -# so lets run every 9 minutes and 10 seconds. -OnUnitActiveSec=550 - -[Install] -WantedBy=timers.target -EOF - m systemctl daemon-reload - m systemctl restart spamddnsfix.timer - m systemctl enable spamddnsfix.timer ;; esac diff --git a/spamd-dns-fix b/spamd-dns-fix deleted file mode 100755 index fb042f5..0000000 --- a/spamd-dns-fix +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -set -eE -o pipefail -trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR - -[[ $EUID == 0 ]] - -# to deal with this bug until it\'s fixed -# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=741521 -# I just happened to notice it in my journal. -str="dns: sendto() to \S\+ failed: Connection refused, failing over" -if journalctl --since=-9m --unit=spamassassin | \ - grep "$str" &>/dev/null; then - echo "dns bug, restarting spamassassin" - systemctl restart spamassassin -fi