script/bracket_fastcgi_manage.pl untested

filter: Statementstmt 0.0% 0 / 13 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 1 Podpod n/a totaltotal 0.0% 0 / 26 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/env perl
2  
3 eval { use FCGI::Engine::Manager };
4 if ($@) { die "You need to install FCGI::Engine to run this script\n"; }
5  
6 my $m =
7 FCGI::Engine::Manager->new( conf => 'script/bracket_fastcgi_manage.yml' );
8  
9 my ( $command, $server_name ) = @ARGV;
10 $m->start($server_name) if $command eq 'start';
11 $m->stop($server_name) if $command eq 'stop';
12 $m->restart($server_name) if $command eq 'restart';
13 $m->graceful($server_name) if $command eq 'graceful';
14 print $m->status($server_name) if $command eq 'status';
15  
16 =head1 Usage
17  
18 NOTE: Run this script from the parent directory so path to configuration is correct.
19  
20 perl script/bracket_fastcgi_manage.pl start
21 perl script/bracket_fastcgi_manage.pl stop
22 perl script/bracket_fastcgi_manage.pl restart bracket.server
23
24  
25 =head1 Web Server Configuration
26  
27 =head2 Apache
28  
29 In an apache conf file:
30  
31 FastCgiExternalServer /tmp/bracket.fcgi -socket /tmp/bracket.socket
32 Alias /bracket /tmp/bracket.fcgi/