new ticket from slaven
[andk-cpan-tools.git] / bin / testing-rmirror-pause-k81-port873.pl
blob50f8ce8c0a0f6c1c10e3c365deaff221eeaf543f
1 #!/usr/local/perl-5.10-uld/bin/perl
3 #$ENV{USER}="andk"; # fill in your name
4 #$ENV{RSYNC_PASSWORD} = shift or die; # fill in your passwd
6 use File::Rsync::Mirror::Recent;
7 my @rrr = map {
8 File::Rsync::Mirror::Recent->new
10 ignore_link_stat_errors => 1,
11 localroot => "/home/ftp/pub/PAUSE/$_",
12 remote => "pause.perl.org::PAUSE/$_/RECENT.recent",
13 max_files_per_connection => 200,
14 rsync_options =>
16 port => 873,
17 compress => 1,
18 links => 1,
19 times => 1,
20 timeout => 600,
21 checksum => 0,
23 ttl => 10,
24 verbose => 1,
25 # verboselog => "/var/log/rmirror-pause.log",
26 runstatusfile => "/var/log/rmirror-status-$_.state",
27 )} "authors", "modules";
28 die "directory $_ doesn't exist, giving up" for grep { ! -d $_->localroot } @rrr;
29 while (){
30 my $ttgo = time + 20;
31 for my $rrr (@rrr){
32 $rrr->rmirror ( "skip-deletes" => 1 );
34 my $sleep = $ttgo - time;
35 if ($sleep >= 1) {
36 # print STDERR "sleeping $sleep ... ";
37 sleep $sleep;