# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
$doesntrun{$pidfile} = 1;
+ $http2pid = $pid2 = 0;
next;
}
$doesntrun{$pidfile} = 0;
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
stopserver($server, "$pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
- return (0,0);
+ return (0, 0, 0);
}
# where is it?
stopserver($server, "$httppid $pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
- return (0,0);
+ return (0, 0, 0);
}
$pid2 = $pid3;
}
if(!$stunnel) {
- return (0,0);
+ return (0, 0, 0);
}
$server = servername_id($proto, $ipvnum, $idnum);
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
stopserver($server, "$pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
- next;
- }
-
- # Server is up. Verify that we can speak to it.
- $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
- if(!$pid3) {
- logmsg "RUN: $srvrname server failed verification\n";
- # failed to talk to it properly. Kill the server and return failure
- stopserver($server, "$httpspid $pid2");
- displaylogs($testnumcheck);
- $doesntrun{$pidfile} = 1;
+ $httpspid = $pid2 = 0;
next;
}
# we have a server!
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
}
else {
print STDERR "Unsupported protocol $proto!!\n";
- return 0;
+ return (0,0);
}
return ($pid2, $ftppid);
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
stopserver($server, "$pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
+ $ftpspid = $pid2 = 0;
next;
}
- $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
- if(!$pid3) {
- logmsg "RUN: $srvrname server failed verification\n";
- # failed to talk to it properly. Kill the server and return failure
- stopserver($server, "$ftpspid $pid2");
- displaylogs($testnumcheck);
- $doesntrun{$pidfile} = 1;
- next;
- }
- # Here pid3 is actually the pid returned by the unsecure-ftp server.
-
+ $doesntrun{$pidfile} = 0;
$runcert{$server} = $certfile;
if($verbose) {
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
stopserver($server, "$pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
- return (0,0);
+ return (0, 0, 0);
}
my $port = pidfromfile($portfile);
stopserver($server, "$tftppid $pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
- return (0,0);
+ return (0, 0, 0);
}
$pid2 = $pid3;
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
stopserver($server, "$pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
- return (0,0);
+ return (0, 0, 0);
}
my $port = pidfromfile($portfile);
stopserver($server, "$rtsppid $pid2");
displaylogs($testnumcheck);
$doesntrun{$pidfile} = 1;
- return (0,0);
+ return (0, 0, 0);
}
$pid2 = $pid3;
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $sshd = find_sshd();
logmsg "RUN: failed to start the $srvrname server on $port\n";
stopserver($server, "$pid2");
$doesntrun{$pidfile} = 1;
+ $sshpid = $pid2 = 0;
next;
}
- # ssh server verification allows some extra time for the server to
- # start up and gives us the opportunity of recovering the pid from the
- # pidfile, when this verification succeeds the recovered pid is
- # assigned to pid2.
-
- my $pid3 = verifyserver($proto, $ipvnum, $idnum, $ip, $port);
- if(!$pid3) {
- logmsg "RUN: $srvrname server failed verification\n";
- # failed to fetch server pid. Kill the server and return failure
- stopserver($server, "$sshpid $pid2");
- $doesntrun{$pidfile} = 1;
- next;
- }
- $pid2 = $pid3;
-
# once it is known that the ssh server is alive, sftp server
# verification is performed actually connecting to it, authenticating
# and performing a very simple remote command. This verification is
display_sshdconfig();
stopserver($server, "$sshpid $pid2");
$doesntrun{$pidfile} = 1;
+ $sshpid = $pid2 = 0;
next;
}
# we're happy, no need to loop anymore!
+ $doesntrun{$pidfile} = 0;
$wport = $port;
last;
}
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
logmsg "RUN: failed to start the $srvrname server\n";
stopserver($server, "$pid2");
$doesntrun{$pidfile} = 1;
- return (0,0);
+ return (0, 0, 0);
}
my $port = pidfromfile($portfile);
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);
# don't retry if the server doesn't work
if ($doesntrun{$pidfile}) {
- return (0,0);
+ return (0, 0, 0);
}
my $pid = processexists($pidfile);