--- tst_out.original Sat Jul 6 02:19:14 1996 +++ tst_out Sat May 30 13:03:55 1998 @@ -1,34 +1,42 @@ #!/bin/perl +# $Header: /e/u/j/local-repository/htdocs/www/software/inn/makefeedmap/tst_out.patch,v 1.1.1.1 2008/03/12 10:53:33 makoto Exp $ +# --------------------------------------------------------------- +# Path to database made by 'tst' +$dbp1 = '/var/log/news/' ; -require "getopts.pl"; +$dbp2 = '/var/log/news/db/' ; +$dbnam = 'tstdb' ; +$db = $dbp2.$dbnam; +$resultfile = $dbp2 . "tstdata"; -# Path to database made by 'tst' -$dbp1 = "/usr/local/news/log/"; -$dbp2 = "/usr/local/news/log/db/"; -$dbnam = "tstdb"; -$db = $dbp2.$dbnam; -$resultfile = $dbp2 . "tstdata"; -$tries = 10; -$cflush="/usr/local/news/inn/bin/ctlinnd flush"; +$tries = 10; +$cflush = '/usr/news/bin/ctlinnd flush ' ; +$SITE = 'TST'; # site name in newsfeeds # The name of your host -- if hostname gives FQDN, then use this # else use the second line with correct #$host=`hostname`; -$host='swidir.switch.ch'; +$host = 'swidir.switch.ch'; # Give a cutoff -- little links don't count and this will reduce # the size of the result files -$cutoff = 7*30; # 7 Days a 30 articles each +$cutoff = 7*30; # 7 Days a 30 articles each # Path to sendmail program -$sendmail='/usr/lib/sendmail'; - -# +$sendmail = '/usr/lib/sendmail'; +# --------------------------------------------------------------- +require "getopts.pl"; +Getopts('hfnr'); +# --------------------------------------------------------------- +if ( $#ARGV > -1 && -r $ARGV[0] ) { + require $ARGV[0]; +} +# --------------------------------------------------------------- # Nothing should need changes below (I hope) # -$usage = "tst_out (c) Heiko Rupp with additions by Felix Kugler +$usage = "tst_out (c) Heiko Rupp with additions by Felix Kugler Cycle db with Path:-data collected by 'tst', preprocess and send data to Heiko. Usage: tst_out [-fhr] -f: write to file $resultfile instead of piping into sendmail @@ -36,7 +44,7 @@ -n: do not cycle db, use old copy to process & send -r: resend existing result file $resultfile, do not cycle db\n"; -&Getopts('hfnr'); + if ($opt_h) { print "$usage"; exit 0; } $host =~ s/\n//; # chop occasional linefeed @@ -59,7 +67,7 @@ system("mv $dbnam* $dbp2"); - system($cflush." TST"); + system($cflush. ' '. $SITE); sleep 2; }