aboutsummaryrefslogtreecommitdiff
path: root/mail/assp/files/periodic-assp.sh.in
diff options
context:
space:
mode:
authorDmitry Marakasov <amdmi3@FreeBSD.org>2009-05-22 01:43:29 +0000
committerDmitry Marakasov <amdmi3@FreeBSD.org>2009-05-22 01:43:29 +0000
commitadda500cd96e22eb058b59c32096af0eea759621 (patch)
tree83db5bb938613dbc097512a66cfc13f653948944 /mail/assp/files/periodic-assp.sh.in
parent4e32eb8ebedaece6bcd567a20eed14229211dd5d (diff)
downloadports-adda500cd96e22eb058b59c32096af0eea759621.tar.gz
ports-adda500cd96e22eb058b59c32096af0eea759621.zip
Notes
Diffstat (limited to 'mail/assp/files/periodic-assp.sh.in')
-rw-r--r--mail/assp/files/periodic-assp.sh.in25
1 files changed, 7 insertions, 18 deletions
diff --git a/mail/assp/files/periodic-assp.sh.in b/mail/assp/files/periodic-assp.sh.in
index c6f970e70c51..0bce9032d2d3 100644
--- a/mail/assp/files/periodic-assp.sh.in
+++ b/mail/assp/files/periodic-assp.sh.in
@@ -2,30 +2,19 @@
#
# $FreeBSD$
#
-# Update ASSP Spam and ClamAV databases
+# Run ASSP's nightly housekeeping script, rebuildspamdb.pl
+# Delete old ASSP log files
cd %%ASSP_HOME%%
-if [ ! -f %%PREFIX%%/lib/assp/rebuildspamdb.pl ]
+if [ ! -f %%DATADIR%%/rebuildspamdb.pl ]
then
- echo "%%PREFIX%%/lib/assp/rebuildspamdb.pl does not exist"
+ echo "%%DATADIR%%/rebuildspamdb.pl does not exist"
rc_spamdb=2
else
echo ""
echo "Running ASSP rebuildspamdb.pl:"
- %%PERL%% %%PREFIX%%/lib/assp/rebuildspamdb.pl && rc_spamdb=0 || rc_spamdb=3
-fi
-
-if [ ! -f %%PREFIX%%/lib/assp/freshclam.sh ]
-then
- # existence of freshclam.sh is optional, dependent
- # on the WITH_CLAMAV setting, so not an error if not there
- rc_clamav=0
-else
- echo ""
- echo "Fetching ASSP ClamAV virus database updates:"
- export PATH=$PATH:%%LOCALBASE%%/bin
- sh %%PREFIX%%/lib/assp/freshclam.sh && rc_clamav=0 || rc_clamav=3
+ %%PERL%% %%DATADIR%%/rebuildspamdb.pl && rc_spamdb=0 || rc_spamdb=3
fi
. %%RC_SUBR%%
@@ -36,6 +25,6 @@ load_rc_config $name
echo ""
echo "Removing old ASSP log files:"
-find . -name '*.maillog.txt' -mtime +$assp_logexpire -exec ls -l {} \; -exec rm {} \;
+find -L . -name '*.maillog.txt' -mtime +$assp_logexpire -exec ls -l {} \; -exec rm {} \;
-exit $(($rc_spamdb|$rc_clamav))
+exit $rc_spamdb