Ignore:
Timestamp:
2016-05-12T21:52:42+12:00 (8 years ago)
Author:
ak19
Message:

Adjustments for Windows OS to servercontrol.pm::config() which now uses wget.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/servercontrol.pm

    r30531 r30533  
    154154    foreach my $line (@lines) {
    155155        #print STDERR "@@@@ LINE: $line\n";
    156         if($line =~ m@failed: Connection timed out.$@) {
     156        if($line =~ m@failed: Connection timed out.$@) { # linux
    157157        $response_code = "failed: Connection timed out.";
     158        last; # break keyword in perl = last
     159        }
     160        elsif($line =~ m@Giving up.$@) { # windows (unless -T 5 -t 1 is not passed in)
     161        $response_code = "failed: Giving up.";
    158162        last; # break keyword in perl = last
    159163        }
     
    169173    }
    170174
    171     if($command =~ m@ping@ && $response_code =~ m@failed: Connection refused@) {
     175    if($command =~ m@ping@ && $response_code =~ m@failed: (Connection refused|Giving up)@) {
    172176        # server not running
    173177        $self->print_msg("*** Server not running. $library_url$command\n", 3);
Note: See TracChangeset for help on using the changeset viewer.