1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
|
# THE DATABASE:
# generated by dbconfig-common
# map from dbconfig-common database types to their names as known by RT
my %typemap = (
mysql => 'mysql',
pgsql => 'Pg',
sqlite3 => 'SQLite',
);
Set($DatabaseType, $typemap{_DBC_DBTYPE_} || "UNKNOWN");
Set($DatabaseHost, '_DBC_DBSERVER_');
Set($DatabasePort, '_DBC_DBPORT_');
Set($DatabaseUser , '_DBC_DBUSER_');
Set($DatabasePassword , '_DBC_DBPASS_');
# SQLite needs a special case, since $DatabaseName must be a full pathname
my $dbc_dbname = '_DBC_DBNAME_'; if ( "_DBC_DBTYPE_" eq "sqlite3" ) { Set ($DatabaseName, '_DBC_BASEPATH_' . '/' . $dbc_dbname); } else { Set ($DatabaseName, $dbc_dbname); }
# Set a sane database admin user. You may need to override this in a config file
# loaded after this file.
if ( '_DBC_DBTYPE_' eq 'pgsql' ) {
Set ($DatabaseAdmin, 'postgres');
} elsif ( '_DBC_DBTYPE_' eq 'mysql' ) {
Set ($DatabaseAdmin, 'root');
}
|