Fix sa-update not detecting spamd running. Fixes bug #755644

- Add restart=always to systemd file to work around upstream bug. Bug #812359
This commit is contained in:
Kevin Fenzi 2012-08-03 13:39:45 -06:00
parent 33a4d66c4a
commit 47aa2bac4e
3 changed files with 11 additions and 6 deletions

View File

@ -10,7 +10,7 @@ unset SAUPDATE OPTIONS DEBUG NOTIFY_UPD
[ -f /etc/sysconfig/sa-update ] && . /etc/sysconfig/sa-update
[ "$SAUPDATE" = "no" ] && exit 0
for daemon in spamd amavisd; do
/sbin/pidof $daemon >& /dev/null
/sbin/pgrep $daemon >& /dev/null
[ $? -eq 0 ] && SAUPDATE=yes
done
[ -f /var/run/mimedefang.pid ] && SAUPDATE=yes
@ -69,10 +69,10 @@ if [ $status -eq 0 ]; then
else
echo "$now: SpamAssassin: Update processed successfully" >>/var/log/sa-update.log
fi
/sbin/service spamassassin condrestart > /dev/null
[ -f /etc/init.d/amavisd ] && /sbin/service amavisd condrestart > /dev/null
[ -f /var/run/mimedefang.pid ] && /sbin/service mimedefang reload > /dev/null
[ -f /etc/init.d/spampd ] && /etc/init.d/spampd condrestart > /dev/null
/sbin/service spamassassin condrestart >& /dev/null
[ -f /etc/init.d/amavisd ] && /sbin/service amavisd condrestart >& /dev/null
[ -f /var/run/mimedefang.pid ] && /sbin/service mimedefang reload >& /dev/null
[ -f /etc/init.d/spampd ] && /etc/init.d/spampd condrestart >& /dev/null
exit $status
fi
if [ $status -eq 1 ]; then

View File

@ -10,6 +10,7 @@ ExecStartPre=-/sbin/portrelease spamd
ExecStart=/usr/bin/spamd --pidfile /var/run/spamd.pid $SPAMDOPTIONS
StandardOutput=syslog
StandardError=syslog
Restart=always
[Install]
WantedBy=multi-user.target

View File

@ -69,7 +69,7 @@ Summary: Spam filter for email which can be invoked from mail delivery agents
Name: spamassassin
Version: 3.3.2
#Release: 0.8.%{prerev}%{?dist}
Release: 11%{?dist}
Release: 12%{?dist}
License: ASL 2.0
Group: Applications/Internet
URL: http://spamassassin.apache.org/
@ -352,6 +352,10 @@ fi
%endif
%changelog
* Fri Aug 03 2012 Kevin Fenzi <kevin@scrye.com> - 3.3.2-12
- Fix sa-update not detecting spamd running. Fixes bug #755644
- Add restart=always to systemd file to work around upstream bug. Bug #812359
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.3.2-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild