X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=contrib%2Fmakestorconf.in;fp=contrib%2Fmakestorconf.in;h=0000000000000000000000000000000000000000;hb=b7a32e2d73e3ab1add8208d3e157f7269a31ef4d;hp=c92bc8326b7426b256b0e94eca606d585c886309;hpb=ac902a8299ff4469b356836f431ead31c3377377;p=innduct.git diff --git a/contrib/makestorconf.in b/contrib/makestorconf.in deleted file mode 100644 index c92bc83..0000000 --- a/contrib/makestorconf.in +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/local/bin/perl -# fixscript will replace this line with require innshellvars.pl - -# Create storage.conf script based on recently read articles. - -$readfile="$inn::pathdb/readgroups"; - -$outfile="$inn::pathdb/storage.conf"; -outloop: -for ($level=9 ; $level >= 2; --$level) { - # clear groups hash. - foreach $i (keys %groups) { - delete $groups{$i}; - } - if (open(RDF, "sort $readfile|")) { - while () { - chop; - next if (/^group/); # bogus - @foo=split(/ /); # foo[0] should be group, foo[1] lastreadtime - @bar=split(/\./,$foo[0]); - if ( $level >= scalar @bar) { - $grf = join(".", @bar); - } else { - $grf=join(".", @bar[0..($level-1)]) . ".*"; - } - $groups{$grf} = 1; - } - close(RDF); - } - $grlist = join(",",keys(%groups)); - last outloop if (length($grlist) < 2048); -} - -open(OUT, ">$outfile") || die "cant open $outfile"; -#open(OUT, ">/dev/tty"); - -print OUT <<"EOF" ; -method cnfs { - newsgroups: control,control.* - class: 1 - options: MINI -} - -method timecaf { - newsgroups: $grlist - class: 1 -} - -method cnfs { - newsgroups: * - options: MONGO - class: 0 -} -EOF -close(OUT); -exit(0);