X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Fsbin%2Frt-server.fcgi;h=c451a7370e51e840e20090b1101b018205f1b880;hb=ed1f84b4e8f626245995ecda5afcf83092c153b2;hp=78533c6e52db97ce4f5a0de4e17ad3e8d6ad6334;hpb=6587f6ba7d047ddc1686c080090afe7d53365bd4;p=freeside.git diff --git a/rt/sbin/rt-server.fcgi b/rt/sbin/rt-server.fcgi index 78533c6e5..c451a7370 100755 --- a/rt/sbin/rt-server.fcgi +++ b/rt/sbin/rt-server.fcgi @@ -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,8 @@ if (grep { m/help/ } @ARGV) { require RT; RT->LoadConfig(); +RT->InitPluginPaths(); +RT->InitLogging(); require Module::Refresh if RT->Config->Get('DevelMode'); require RT::Handle; @@ -125,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 ) { @@ -136,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; } @@ -171,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' );