diff options
Diffstat (limited to 'htetc')
-rw-r--r-- | htetc/handler.pl | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/htetc/handler.pl b/htetc/handler.pl index d7c56572c..3c68e83ed 100644 --- a/htetc/handler.pl +++ b/htetc/handler.pl @@ -8,10 +8,19 @@ use FS::Mason qw( mason_interps ); use FS::Trace; if ( %%%RT_ENABLED%%% ) { + require RT; + $> = scalar(getpwnam('freeside')); + RT::LoadConfig(); RT::Init(); + + # disconnect DB before fork: + # (avoid 'prepared statement "dbdpg_p\d+_\d+" already exists' errors?) + $RT::Handle->dbh(undef); + undef $RT::Handle; + $> = $<; } |