File: dbconfig.template

package info (click to toggle)
request-tracker4 4.4.7%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 62,888 kB
  • sloc: javascript: 130,444; perl: 65,442; sh: 1,350; makefile: 480; python: 37; php: 30
file content (33 lines) | stat: -rw-r--r-- 941 bytes parent folder | download
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
29
30
31
32
33
# 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');
}