cp htetc/handler.pl ${MASON_HANDLER}
perl -p -i -e "\
s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
+ s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
" ${MASON_HANDLER} || true
mkdir -p ${FREESIDE_EXPORT}/profile
chown freeside ${FREESIDE_EXPORT}/profile
use FS::Mason qw( mason_interps );
use FS::Trace;
+if ( %%%RT_ENABLED%%% ) {
+ require RT;
+ $> = scalar(getpwnam('freeside'));
+ RT::LoadConfig();
+ RT::Init();
+ $> = $<;
+}
+
#use vars qw($r);
# Bring in ApacheHandler, necessary for mod_perl integration.
$status;
}
-my $rt_initialized = 0;
-
sub my_rt_init {
return unless $RT::VERSION;
-
- if ( $rt_initialized ) {
- RT::ConnectToDatabase();
- RT::InitSignalHandlers();
- } else {
- RT::LoadConfig();
- RT::Init();
- $rt_initialized++;
- }
+ RT::ConnectToDatabase();
+ RT::InitSignalHandlers();
}
1;