add standardized sa-update cron script, disabled by default
This commit is contained in:
parent
052f4f3334
commit
0dd949ee75
7
sa-update.cronscript
Normal file
7
sa-update.cronscript
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
sleep $(expr $RANDOM % 7200)
|
||||
echo SpamAssassin rule update begins at `date`
|
||||
/usr/bin/sa-update
|
||||
/etc/init.d/spamassassin condrestart
|
||||
echo
|
9
sa-update.crontab
Normal file
9
sa-update.crontab
Normal file
@ -0,0 +1,9 @@
|
||||
### OPTIONAL: Spamassassin Rules Updates ###
|
||||
#
|
||||
# http://wiki.apache.org/spamassassin/RuleUpdates
|
||||
# Highly recommended that you read the documentation before using this.
|
||||
# ENABLE UPDATES AT YOUR OWN RISK.
|
||||
#
|
||||
# /var/log/sa-update.log contains a history log of sa-update runs
|
||||
|
||||
#10 4 * * * root /usr/share/spamassassin/sa-update.cron 2>&1 | tee -a /var/log/sa-update.log
|
5
sa-update.logrotate
Normal file
5
sa-update.logrotate
Normal file
@ -0,0 +1,5 @@
|
||||
/var/log/sa-update.log {
|
||||
monthly
|
||||
notifyempty
|
||||
missingok
|
||||
}
|
@ -6,7 +6,7 @@
|
||||
Summary: Spam filter for email which can be invoked from mail delivery agents.
|
||||
Name: spamassassin
|
||||
Version: 3.1.7
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
License: Apache License
|
||||
Group: Applications/Internet
|
||||
URL: http://spamassassin.apache.org/
|
||||
@ -15,6 +15,9 @@ Source2: redhat_local.cf
|
||||
Source3: spamassassin-default.rc
|
||||
Source4: spamassassin-spamc.rc
|
||||
Source5: spamassassin.sysconfig
|
||||
Source6: sa-update.logrotate
|
||||
Source7: sa-update.crontab
|
||||
Source8: sa-update.cronscript
|
||||
Source10: spamassassin-helper.sh
|
||||
# Patches 0-99 are RH specific
|
||||
# none yet
|
||||
@ -88,12 +91,17 @@ install -m 0755 spamd/redhat-rc-script.sh %buildroot/%{_initrddir}/spamassassin
|
||||
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
|
||||
install -m 0644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/mail/spamassassin/local.cf
|
||||
install -m644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/spamassassin
|
||||
|
||||
install -m 0644 %{SOURCE3} %buildroot/etc/mail/spamassassin
|
||||
install -m 0644 %{SOURCE4} %buildroot/etc/mail/spamassassin
|
||||
install -m 0755 %{SOURCE10} %buildroot/etc/mail/spamassassin
|
||||
install -m 0644 %{SOURCE6} %buildroot/etc/logrotate.d/sa-update
|
||||
install -m 0600 %{SOURCE7} %buildroot/etc/cron.d/sa-update
|
||||
install -m 0744 %{SOURCE8} %buildroot%{_datadir}/spamassassin/sa-update.cron
|
||||
|
||||
[ -x /usr/lib/rpm/brp-compress ] && /usr/lib/rpm/brp-compress
|
||||
|
||||
@ -124,6 +132,8 @@ mkdir -p $RPM_BUILD_ROOT%{_localstatedir}/lib/spamassassin
|
||||
%dir %{_datadir}/spamassassin
|
||||
%dir %{_localstatedir}/run/spamassassin
|
||||
%dir %{_localstatedir}/lib/spamassassin
|
||||
%{_sysconfdir}/cron.d/sa-update
|
||||
%{_sysconfdir}/logrotate.d/spamassassin
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
@ -162,6 +172,9 @@ fi
|
||||
exit 0
|
||||
|
||||
%changelog
|
||||
* Thu Dec 14 2006 Warren Togami <wtogami@redhat.com> - 3.1.7-3
|
||||
- add standardized sa-update cron script, disabled by default
|
||||
|
||||
* Thu Dec 14 2006 Warren Togami <wtogami@redhat.com> - 3.1.7-2
|
||||
- own directory /var/lib/spamassassin
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user