X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fsbin%2Fstandalone_httpd.in;h=5bd8f3ed2c58bfd3d6a6d6b599d93f1768a73f47;hp=45c3770886bcf8988f9d14c461e72b4fec27dab7;hb=0ea23112cfa0d82738b0f08d60d90579721b7524;hpb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500 diff --git a/rt/sbin/standalone_httpd.in b/rt/sbin/standalone_httpd.in index 45c377088..5bd8f3ed2 100644 --- a/rt/sbin/standalone_httpd.in +++ b/rt/sbin/standalone_httpd.in @@ -3,7 +3,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -91,6 +91,7 @@ if (grep { m/help/ } @ARGV) { require RT; RT->LoadConfig(); +RT->InitPluginPaths(); RT->InitLogging(); require Module::Refresh if RT->Config->Get('DevelMode'); @@ -126,7 +127,7 @@ EOF RT->InstallMode(1); } else { - RT->Init(); + RT->Init( Heavy => 1 ); my ($status, $msg) = RT::Handle->CheckCompatibility( $RT::Handle->dbh, 'post'); unless ( $status ) { @@ -137,6 +138,7 @@ EOF # we must disconnect DB before fork if ($RT::Handle) { + $RT::Handle->dbh->disconnect if $RT::Handle->dbh; $RT::Handle->dbh(undef); undef $RT::Handle; } @@ -172,7 +174,7 @@ if (caller) { require Plack::Runner; my $is_fastcgi = $0 =~ m/fcgi$/; -my $r = Plack::Runner->new( $0 =~ 'standalone' ? ( server => 'Standalone' ) : +my $r = Plack::Runner->new( $0 =~ /standalone/ ? ( server => 'Standalone' ) : $is_fastcgi ? ( server => 'FCGI' ) : (), env => 'deployment' );