From: David Rosenthal NOTES from author: Just edit the file, so that it rotates the correct files. I'm using the "individual logging" method with listproc 8.2.06 and I have currently adapted the cycle-mbox script to run under 2 different names, one which cycles the mboxes weekly, adn one which cycles the .rep* files monthly. Here is my .rep* file version: ----------BEGIN SCRIPT---------- #!/bin/sh # # Shell script which cycles your $LPDIR/lists/LIST-ALIAS/mbox files # It retains a five unit (a unit can be a day, week, month ... # It should be run out of the listprocessor's account (server) cron entry. # I recommend once per week... # # Marco Hernandez # # # (some time in 1994) # # Modified to use the LPDIR environment variable, rather than "HOME" # Rob von Behren # July, 1996 # File permissions for the new $file was changed from 600 to 640 # -- Davidr 7-20-97 # # rotate /path/file 9 8 7 6 5 4 3 2 1 0 # # Define LPDIR for running from cron - Davidr 10-25-97 LPDIR="/var/listproc" rotate() { file="$1"; shift rm -f "$file.$1" for i in "$@"; do [ "$i" = "0" ] && j="" || j=".`expr $i - 1`" [ -f "$file$j" ] && mv -f "$file$j" "$file.$i" done cp /dev/null "$file"; chmod 640 "$file" } # Run this out of crontab once a MONTH. # These files are impt to have around to do diagnositcs and see list status, # but keeping around a year of these files is unnecessary. # Future versions of listproc may rotate these files appropriately # For the time being, they are taking up too much space on the system # so I'm going to start rotating now. --Davidr 7-26-98 # # Find and cycle the list specific .report archive files ... # for INFILE in `find $LPDIR/lists -name .rep.list.acc -print` do rotate $INFILE 3 2 1 0 done # Cycle the server .report archived files rotate $LPDIR/.rep.catmail.a 2 1 0 rotate $LPDIR/.rep.lp2.acc 2 1 0 rotate $LPDIR/.rep.pqueue.ac 2 1 0 rotate $LPDIR/.rep.revdb.acc 2 1 0 rotate $LPDIR/.rep.server.ac 2 1 0 rotate $LPDIR/.rep.serverd.a 2 1 0 rotate $LPDIR/.rep.start.acc 2 1 0 rotate $LPDIR/.rep.stop.acc 2 1 0 -----------END SCRIPT ---------------