Skip to content

Commit

Permalink
export env vars on starman startup
Browse files Browse the repository at this point in the history
  • Loading branch information
reneeb committed Jan 15, 2013
1 parent f6185ca commit 92649c0
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion pod_book/script/start_stop_starman.pl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@

chdir $dir;

my $config = $ENV{POD_BOOK_CONFIG};
my $mode = $ENV{MOJO_MODE};

my @exports;

push @exports, $config ? "export POD_BOOK_CONFIG=$config" : '';
push @exports, $mode ? "export MOJO_MODE=$mode" : '';

my $exports = join '', map{ $_ . ' && ' }@exports;

my $command = 'starman --listen :3030 --workers ' . $workers . ' --max-requests ' . $max_requests . ' --preload-app';
#exec( $command );
exec( "nohup $command &" );
exec( "nohup $exports $command &" );

0 comments on commit 92649c0

Please sign in to comment.