]> git.uio.no Git - usit-rt.git/blobdiff - sbin/rt-server
Master to 4.2.8
[usit-rt.git] / sbin / rt-server
index 39be083c85992b4705e55f347ad04724fb9c073f..ac61def46a69662f86523d7475bd2c6bb35e0a17 100755 (executable)
@@ -84,6 +84,9 @@ if (grep { m/help/ } @ARGV) {
 }
 
 require RT;
+die "Wrong version of RT $RT::VERSION found; need 4.2.*"
+    unless $RT::VERSION =~ /^4\.2\./;
+
 RT->LoadConfig();
 RT->InitPluginPaths();
 RT->InitLogging();
@@ -131,6 +134,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;
 }