root/Mixxi/trunk/script/mixxi_fastcgi.pl

Revision 2067 (checked in by miyagawa, 13 years ago)

import Mixxi tinyurl

  • Property svn:executable set to *
Line 
1 #!/usr/bin/perl -w
2
3 BEGIN { $ENV{CATALYST_ENGINE} ||= 'FastCGI' }
4
5 use strict;
6 use warnings;
7 use Getopt::Long;
8 use Pod::Usage;
9 use FindBin;
10 use lib "$FindBin::Bin/../lib";
11 use Mixxi;
12
13 my $help = 0;
14 my ( $listen, $nproc, $pidfile, $manager, $detach );
15  
16 GetOptions(
17     'help|?'      => \$help,
18     'listen|l=s'  => \$listen,
19     'nproc|n=i'   => \$nproc,
20     'pidfile|p=s' => \$pidfile,
21     'manager|M=s' => \$manager,
22     'daemon|d'    => \$detach,
23 );
24
25 pod2usage(1) if $help;
26
27 Mixxi->run(
28     $listen,
29     {   nproc   => $nproc,
30         pidfile => $pidfile,
31         manager => $manager,
32         detach  => $detach,
33     }
34 );
35
36 1;
37
38 =head1 NAME
39
40 mixxi_fastcgi.pl - Catalyst FastCGI
41
42 =head1 SYNOPSIS
43
44 mixxi_fastcgi.pl [options]
45  
46  Options:
47    -? -help      display this help and exits
48    -l -listen    Socket path to listen on
49                  (defaults to standard input)
50                  can be HOST:PORT, :PORT or a
51                  filesystem path
52    -n -nproc     specify number of processes to keep
53                  to serve requests (defaults to 1,
54                  requires -listen)
55    -p -pidfile   specify filename for pid file
56                  (requires -listen)
57    -d -daemon    daemonize (requires -listen)
58    -M -manager   specify alternate process manager
59                  (FCGI::ProcManager sub-class)
60                  or empty string to disable
61
62 =head1 DESCRIPTION
63
64 Run a Catalyst application as fastcgi.
65
66 =head1 AUTHOR
67
68 Sebastian Riedel, C<sri@oook.de>
69 Maintained by the Catalyst Core Team.
70
71 =head1 COPYRIGHT
72
73 This library is free software, you can redistribute it and/or modify
74 it under the same terms as Perl itself.
75
76 =cut
Note: See TracBrowser for help on using the browser.