Lines Matching refs:server
21 # Based on the type of server specified, signal the server to stop, wait
23 # If a server is specified, stop it. Otherwise, stop all servers for test.
29 # [--use-rndc] test [server]
32 # server - name of the server directory
34 my $usage = "usage: $0 [--use-rndc] test-directory [server-directory]";
47 my $server = $ARGV[1];
53 die "No server directory: \"$server\"\n" if (defined($server) && !-d "$test/$server");
61 if (defined $server) {
62 @servers = ($server);
77 # Stop the server(s), pass 1: rndc.
79 foreach my $server (grep /^ns/, @servers) {
80 stop_rndc($server);
88 foreach my $server (@servers) {
89 stop_signal($server, "TERM");
95 foreach my $server (@servers) {
96 stop_signal($server, "ABRT");
103 # Return the full path to a given server's PID file.
105 my($server) = @_;
108 if ($server =~ /^ns/) {
110 } elsif ($server =~ /^lwresd/) {
112 } elsif ($server =~ /^ans/) {
115 print "I:Unknown server type $server\n";
118 $pid_file = "$testdir/$server/$pid_file";
140 my($server) = @_;
142 return unless ($server =~ /^ns(\d+)$/);
146 system("$ENV{RNDC} -c $testdir/../common/rndc.conf -s $ip -p 9953 stop | sed 's/^/I:$server /'");
150 # Stop a server by sending a signal to it.
152 my($server, $sig) = @_;
154 my $pid_file = server_pid_file($server);
161 print "I:$server didn't die when sent a SIGTERM\n";
167 print "I:$server died before a SIG$sig was sent\n";