mirror of https://github.com/dani/vroom.git
parent
7370977481
commit
918065abd2
4 changed files with 30 additions and 8 deletions
@ -1,6 +0,0 @@ |
||||
#!/bin/sh |
||||
|
||||
DIR=$(dirname $0) |
||||
export PERL5LIB="$DIR/../lib/" |
||||
cd $DIR/.. |
||||
hypnotoad -f vroom.pl "$*" |
@ -0,0 +1,26 @@ |
||||
#!/usr/bin/env perl |
||||
|
||||
use strict; |
||||
use warnings; |
||||
use Config::Simple; |
||||
use File::Basename; |
||||
|
||||
my $dir=dirname($0); |
||||
chdir $dir . '/..'; |
||||
|
||||
my $cfg = new Config::Simple(); |
||||
$cfg->read('conf/settings.ini'); |
||||
our $config = $cfg->vars(); |
||||
|
||||
$config->{'daemon.listen_ip'} ||= '127.0.0.1'; |
||||
$config->{'daemon.listen_port'} ||= '8090'; |
||||
$config->{'daemon.backend'} ||= 'hypnotoad'; |
||||
|
||||
$ENV{'PERL5LIB'} = 'lib'; |
||||
|
||||
if ($config->{'daemon.backend'} eq 'morbo'){ |
||||
exec ('/usr/bin/morbo', '-l', 'http://' . $config->{'daemon.listen_ip'} . ':' . $config->{'daemon.listen_port'}, '-v', 'vroom.pl'); |
||||
} |
||||
else{ |
||||
exec ('/usr/bin/hypnotoad', '-f', 'vroom.pl'); |
||||
} |
Loading…
Reference in new issue