diff --git a/src/Hydra/script/hydra_create.pl b/src/Hydra/script/hydra_create.pl index 24d759d0..e58f4474 100755 --- a/src/Hydra/script/hydra_create.pl +++ b/src/Hydra/script/hydra_create.pl @@ -4,7 +4,19 @@ use strict; use warnings; use Getopt::Long; use Pod::Usage; -use Catalyst::Helper; +eval "use Catalyst::Helper;"; + +if ($@) { + die < \$help, 'listen|l=s' => \$listen, @@ -25,10 +25,10 @@ GetOptions( pod2usage(1) if $help; -Hydra->run( - $listen, +Hydra->run( + $listen, { nproc => $nproc, - pidfile => $pidfile, + pidfile => $pidfile, manager => $manager, detach => $detach, keep_stderr => $keep_stderr, @@ -44,7 +44,7 @@ hydra_fastcgi.pl - Catalyst FastCGI =head1 SYNOPSIS hydra_fastcgi.pl [options] - + Options: -? -help display this help and exits -l -listen Socket path to listen on diff --git a/src/Hydra/script/hydra_server.pl b/src/Hydra/script/hydra_server.pl index cd1e68a8..11b3d365 100755 --- a/src/Hydra/script/hydra_server.pl +++ b/src/Hydra/script/hydra_server.pl @@ -1,10 +1,10 @@ #!/var/run/current-system/sw/bin/perl -w -BEGIN { +BEGIN { $ENV{CATALYST_ENGINE} ||= 'HTTP'; - $ENV{CATALYST_SCRIPT_GEN} = 31; + $ENV{CATALYST_SCRIPT_GEN} = 32; require Catalyst::Engine::HTTP; -} +} use strict; use warnings; @@ -17,9 +17,9 @@ my $debug = 0; my $fork = 0; my $help = 0; my $host = undef; -my $port = $ENV{HYDRAFRONTEND_PORT} || $ENV{CATALYST_PORT} || 3000; +my $port = $ENV{HYDRA_PORT} || $ENV{CATALYST_PORT} || 3000; my $keepalive = 0; -my $restart = $ENV{HYDRAFRONTEND_RELOAD} || $ENV{CATALYST_RELOAD} || 0; +my $restart = $ENV{HYDRA_RELOAD} || $ENV{CATALYST_RELOAD} || 0; my $restart_delay = 1; my $restart_regex = '(?:/|^)(?!\.#).+(?:\.yml$|\.yaml$|\.conf|\.pm)$'; my $restart_directory = undef;