[2] | 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"; |
---|
[242] | 11 | use Epoll; |
---|
[2] | 12 | |
---|
| 13 | my $help = 0; |
---|
| 14 | my ( $listen, $nproc, $pidfile, $manager, $detach, $keep_stderr ); |
---|
| 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 | 'keeperr|e' => \$keep_stderr, |
---|
| 24 | ); |
---|
| 25 | |
---|
| 26 | pod2usage(1) if $help; |
---|
| 27 | |
---|
[242] | 28 | Epoll->run( |
---|
[2] | 29 | $listen, |
---|
| 30 | { nproc => $nproc, |
---|
| 31 | pidfile => $pidfile, |
---|
| 32 | manager => $manager, |
---|
| 33 | detach => $detach, |
---|
| 34 | keep_stderr => $keep_stderr, |
---|
| 35 | } |
---|
| 36 | ); |
---|
| 37 | |
---|
| 38 | 1; |
---|
| 39 | |
---|
| 40 | =head1 NAME |
---|
| 41 | |
---|
[242] | 42 | epoll_fastcgi.pl - Catalyst FastCGI |
---|
[2] | 43 | |
---|
| 44 | =head1 SYNOPSIS |
---|
| 45 | |
---|
[242] | 46 | epoll_fastcgi.pl [options] |
---|
[2] | 47 | |
---|
| 48 | Options: |
---|
| 49 | -? -help display this help and exits |
---|
| 50 | -l -listen Socket path to listen on |
---|
| 51 | (defaults to standard input) |
---|
| 52 | can be HOST:PORT, :PORT or a |
---|
| 53 | filesystem path |
---|
| 54 | -n -nproc specify number of processes to keep |
---|
| 55 | to serve requests (defaults to 1, |
---|
| 56 | requires -listen) |
---|
| 57 | -p -pidfile specify filename for pid file |
---|
| 58 | (requires -listen) |
---|
| 59 | -d -daemon daemonize (requires -listen) |
---|
| 60 | -M -manager specify alternate process manager |
---|
| 61 | (FCGI::ProcManager sub-class) |
---|
| 62 | or empty string to disable |
---|
| 63 | -e -keeperr send error messages to STDOUT, not |
---|
| 64 | to the webserver |
---|
| 65 | |
---|
| 66 | =head1 DESCRIPTION |
---|
| 67 | |
---|
| 68 | Run a Catalyst application as fastcgi. |
---|
| 69 | |
---|
| 70 | =head1 AUTHOR |
---|
| 71 | |
---|
| 72 | Sebastian Riedel, C<sri@oook.de> |
---|
| 73 | Maintained by the Catalyst Core Team. |
---|
| 74 | |
---|
| 75 | =head1 COPYRIGHT |
---|
| 76 | |
---|
| 77 | This library is free software, you can redistribute it and/or modify |
---|
| 78 | it under the same terms as Perl itself. |
---|
| 79 | |
---|
| 80 | =cut |
---|