vroom/script/start_server.pl

27 lines
575 B
Perl
Raw Permalink Normal View History

#!/usr/bin/env perl
use strict;
use warnings;
use File::Basename;
2015-06-19 15:05:33 +02:00
use lib dirname($0) . '/../lib';
use Vroom::Conf;
2015-06-19 15:05:33 +02:00
chdir dirname($0) . '/..';
2015-06-19 15:05:33 +02:00
my $config = Vroom::Conf::get_conf();
$ENV{'PERL5LIB'} = 'lib';
$ENV{'MOJO_REVERSE_PROXY'} = 1;
if ($config->{'daemon.backend'} eq 'morbo'){
exec ('/usr/bin/morbo',
'-l', 'http://' . $config->{'daemon.listen_ip'} . ':' . $config->{'daemon.listen_port'},
'-w', 'conf/settings.ini',
'-w', 'lib',
'-w', 'templates',
2015-08-07 11:11:40 +02:00
'-v', 'vroom');
}
else{
2015-08-07 11:11:40 +02:00
exec ('/usr/bin/hypnotoad', '-f', 'vroom');
}