diff options
author | pav <pav@FreeBSD.org> | 2005-12-09 17:04:29 +0800 |
---|---|---|
committer | pav <pav@FreeBSD.org> | 2005-12-09 17:04:29 +0800 |
commit | e4faff89d726e22879c2fcb06fa6a8f5e2b833df (patch) | |
tree | b5fd922e9447f3f4fb55cf35b22a74a974bc8b36 | |
parent | cfde477bcbc01c0151031e3fcf82edc76176cb00 (diff) | |
download | freebsd-ports-gnome-e4faff89d726e22879c2fcb06fa6a8f5e2b833df.tar.gz freebsd-ports-gnome-e4faff89d726e22879c2fcb06fa6a8f5e2b833df.tar.zst freebsd-ports-gnome-e4faff89d726e22879c2fcb06fa6a8f5e2b833df.zip |
Minor changes:
- suppressed two messages logged to stdout when ASSP first starts up
- changed nightly 510.assp periodic script to redirect rebuildspamdb.pl
messages to a file in ASSP dir (nightly.log), thereby suppressing them from
the nightly email
- added rc.conf variable:
assp_logexpire="45"
used by nightly 510.assp periodic script to expire old YY-MM-DD.maillog.txt
files from ASSP dir
- changed the assp(8) manual page to document the new assp_logexpire
configuration variable
PR: ports/90118
Submitted by: J.R. Oldroyd <fbsd@opal.com> (maintainer)
-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)) |