diff options
author | Pav Lucistnik <pav@FreeBSD.org> | 2005-12-09 09:04:29 +0000 |
---|---|---|
committer | Pav Lucistnik <pav@FreeBSD.org> | 2005-12-09 09:04:29 +0000 |
commit | e13427c27bbc4847a8e6f11c02cf9f567e918369 (patch) | |
tree | e0626cb46d12e4846f91675c4eb0c21e768aaab1 /mail/assp | |
parent | 0cc49119d6aaa5ec5a85f9448e35c7d88b3a983a (diff) | |
download | ports-e13427c27bbc4847a8e6f11c02cf9f567e918369.tar.gz ports-e13427c27bbc4847a8e6f11c02cf9f567e918369.zip |
Notes
Diffstat (limited to 'mail/assp')
-rw-r--r-- | mail/assp/Makefile | 1 | ||||
-rw-r--r-- | mail/assp/files/510.assp.in | 17 | ||||
-rw-r--r-- | mail/assp/files/assp.8.in | 4 | ||||
-rw-r--r-- | mail/assp/files/patch-assp.pl | 17 | ||||
-rw-r--r-- | mail/assp/files/periodic-assp.sh.in | 17 |
5 files changed, 52 insertions, 4 deletions
diff --git a/mail/assp/Makefile b/mail/assp/Makefile index e392f1e9e2f9..30f77550a21a 100644 --- a/mail/assp/Makefile +++ b/mail/assp/Makefile @@ -7,6 +7,7 @@ PORTNAME= assp PORTVERSION= 1.1.1 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= assp diff --git a/mail/assp/files/510.assp.in b/mail/assp/files/510.assp.in index 6b76b890ef29..f5964e4d38a4 100644 --- a/mail/assp/files/510.assp.in +++ b/mail/assp/files/510.assp.in @@ -6,14 +6,17 @@ cd %%ASSP_HOME%% +[ -f nightly.log ] && mv nightly.log nightly.log.old + if [ ! -f %%PREFIX%%/lib/assp/rebuildspamdb.pl ] then echo "%%PREFIX%%/lib/assp/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 + echo "Running ASSP rebuildspamdb.pl (output to nightly.log)" + echo "Running ASSP rebuildspamdb.pl:" >>nightly.log + %%PERL%% %%PREFIX%%/lib/assp/rebuildspamdb.pl >>nightly.log && rc_spamdb=0 || rc_spamdb=3 fi if [ ! -f %%PREFIX%%/lib/assp/freshclam.sh ] @@ -28,4 +31,14 @@ else sh %%PREFIX%%/lib/assp/freshclam.sh && rc_clamav=0 || rc_clamav=3 fi +. %%RC_SUBR%% +name=assp +rcvar=`set_rcvar` +load_rc_config $name +: ${assp_logexpire="45"} + +echo "" +echo "Removing old ASSP log files:" +find . -name '*.maillog.txt' -mtime +$assp_logexpire -exec ls -l {} \; -exec rm {} \; + exit $(($rc_spamdb|$rc_clamav)) diff --git a/mail/assp/files/assp.8.in b/mail/assp/files/assp.8.in index 31a575c76bac..200773cc0fd7 100644 --- a/mail/assp/files/assp.8.in +++ b/mail/assp/files/assp.8.in @@ -239,6 +239,10 @@ to start ASSP at boot time .IP assp_args passed to the ASSP client, default is .I assp_args="%%ASSP_HOME%%" +.IP assp_logexpire +used by nightly script to expire logs, default is +.I assp_logexpire="45" +days .SH FILES .IP %%ASSP_HOME%% location of ASSP config file, log file and spam databases diff --git a/mail/assp/files/patch-assp.pl b/mail/assp/files/patch-assp.pl index 596aa937fd61..e36d719102fd 100644 --- a/mail/assp/files/patch-assp.pl +++ b/mail/assp/files/patch-assp.pl @@ -1,5 +1,14 @@ --- assp.pl.orig Tue Mar 15 06:41:24 2005 +++ assp.pl Wed May 18 11:33:35 2005 +@@ -39,7 +39,7 @@ + + loadConfig(); + sub loadConfig { +- print "loading config -- base='$base'\n"; ++ # print "loading config -- base='$base'\n"; + @Config=( + [0,0,0,heading,'Network Setup'], + # except for the heading lines, all config lines have the following: @@ -58,7 +58,7 @@ 'The address:port of your message handling system\'s smtp server. For example: 127.0.0.1:125'], [AsAService,'As a Service',0,checkbox,'','(\S*)',undef, @@ -30,6 +39,14 @@ 'The *nix group to assume after startup: assp or nogroup -- requires ASSP restart.'], [ChangeRoot,'Change Root',60,textinput,'','(.*)',undef, 'Non-blank means to run in chroot jail in *nix. You need an etc/protocols file to make this work<br /> +@@ -3631,6 +3631,7 @@ + @PossibleOptionFiles=(); + for (@Config) { + if($_->[6] eq 'ConfigMakeRe') { ++ $silent=1 if($AsADaemon); + ${$_->[0]}=optionList(${$_->[0]},$_->[0]); + push(@PossibleOptionFiles,$_->[0]); + } elsif($_->[6] eq 'ConfigCompileRe') { @@ -4462,4 +4462,4 @@ dynablock.njabl.org ); diff --git a/mail/assp/files/periodic-assp.sh.in b/mail/assp/files/periodic-assp.sh.in index 6b76b890ef29..f5964e4d38a4 100644 --- a/mail/assp/files/periodic-assp.sh.in +++ b/mail/assp/files/periodic-assp.sh.in @@ -6,14 +6,17 @@ cd %%ASSP_HOME%% +[ -f nightly.log ] && mv nightly.log nightly.log.old + if [ ! -f %%PREFIX%%/lib/assp/rebuildspamdb.pl ] then echo "%%PREFIX%%/lib/assp/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 + echo "Running ASSP rebuildspamdb.pl (output to nightly.log)" + echo "Running ASSP rebuildspamdb.pl:" >>nightly.log + %%PERL%% %%PREFIX%%/lib/assp/rebuildspamdb.pl >>nightly.log && rc_spamdb=0 || rc_spamdb=3 fi if [ ! -f %%PREFIX%%/lib/assp/freshclam.sh ] @@ -28,4 +31,14 @@ else sh %%PREFIX%%/lib/assp/freshclam.sh && rc_clamav=0 || rc_clamav=3 fi +. %%RC_SUBR%% +name=assp +rcvar=`set_rcvar` +load_rc_config $name +: ${assp_logexpire="45"} + +echo "" +echo "Removing old ASSP log files:" +find . -name '*.maillog.txt' -mtime +$assp_logexpire -exec ls -l {} \; -exec rm {} \; + exit $(($rc_spamdb|$rc_clamav)) |