stas 2003/08/27 10:04:49 Modified: bin makeindex site_build src/search apache.org-setup.pl Log: www has moved to minotaur.apache.org, support both minotaur.apache.org and daedalus.apache.org for a time being Revision Changes Path 1.12 +2 -1 modperl-docs/bin/makeindex Index: makeindex =================================================================== RCS file: /home/cvs/modperl-docs/bin/makeindex,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- makeindex 8 Nov 2002 08:12:10 -0000 1.11 +++ makeindex 27 Aug 2003 17:04:49 -0000 1.12 @@ -44,7 +44,8 @@ require Sys::Hostname; my $hostname = Sys::Hostname::hostname(); - if ($hostname && $hostname eq 'daedalus.apache.org') { + if ($hostname && ($hostname eq 'minotaur.apache.org' || + $hostname eq 'daedalus.apache.org')) { $ENV{MODPERL_SITE} = "http://perl.apache.org/"; $ENV{SWISH_BINARY_PATH} = "/home/perlwww/bin/swish-e"; 1.11 +16 -6 modperl-docs/bin/site_build Index: site_build =================================================================== RCS file: /home/cvs/modperl-docs/bin/site_build,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- site_build 27 Jan 2003 23:04:26 -0000 1.10 +++ site_build 27 Aug 2003 17:04:49 -0000 1.11 @@ -18,6 +18,11 @@ my $rel = "$src/dst_html"; my $dst = "/www/perl.apache.org"; +my %fs = ( + 'minotaur.apache.org' => '/x1', + 'daedalus.apache.org' => '/x2', +); + umask 0002; my $HOME = $ENV{HOME}; @@ -54,8 +59,6 @@ system("bin/build $flags"); system("bin/makeindex") if $reindex; - - } sub online_sync { @@ -67,17 +70,24 @@ } sub fs_is_full { + + require Sys::Hostname; + my $hostname = Sys::Hostname::hostname(); + + # don't check on local systems + return 0 unless $hostname && $fs{$hostname}; + # get available disk space - my $disk = qx{ df | grep /x2 }; + my $disk = qx{ df | grep $fs{$hostname} }; my ($disk_avail) = ($disk =~ /(\d+)\s+\d+\%/); # avail is before capacity # get size of site my $site = qx{ du -c $rel | grep total }; my ($site_size) = ($site =~ /^(\d+)/); - # print "site_size = $site_size , disk_avail = $disk_avail"; - # give us a margin of 50MB - return $site_size + 50*1024 > $disk_avail ? 1 : 0; + return 0 unless $site_size + 50*1024 > $disk_avail; + warn "site_size = $site_size , disk_avail = $disk_avail\n"; + return 1; } 1.6 +2 -1 modperl-docs/src/search/apache.org-setup.pl Index: apache.org-setup.pl =================================================================== RCS file: /home/cvs/modperl-docs/src/search/apache.org-setup.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- apache.org-setup.pl 18 Jun 2002 02:50:41 -0000 1.5 +++ apache.org-setup.pl 27 Aug 2003 17:04:49 -0000 1.6 @@ -8,7 +8,8 @@ require Sys::Hostname; my $hostname = Sys::Hostname::hostname(); - if ($hostname && $hostname eq 'daedalus.apache.org') { + if ($hostname && ($hostname eq 'minotaur.apache.org' || + $hostname eq 'daedalus.apache.org')) { $ENV{SWISH_BINARY_PATH} = "/home/perlwww/bin/swish-e"; unshift @INC,
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]