2 # fixscript will replace this line with require innshellvars.pl
4 # Keep track of which groups are currently being read. Takes logfile input
6 $readfile="$inn::newsetc/readgroups";
9 $oldtime = $curtime - 30 * 86400; # 30 days in the past
11 if (open(RDF, $readfile)) {
14 @foo=split(/ /); # foo[0] should be group, foo[1] lastreadtime
15 if ($foo[1] < $oldtime) {
16 next; # skip entries that are too old.
18 $groups{$foo[0]} = $foo[1];
26 next unless / group /;
29 # group name is in the 8th field.
30 $groups{$foo[7]} = $curtime;
33 open(WRF, ">$readfile") || die "cannot open $readfile for write.\n";
34 foreach $i (keys %groups) {
35 print WRF $i, " ", $groups{$i}, "\n";