File: dbconfig.template

package info (click to toggle)
request-tracker5 5.0.3%2Bdfsg-3~deb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 77,648 kB
  • sloc: javascript: 187,930; perl: 79,061; sh: 1,302; makefile: 471; python: 37; php: 15
file content (28 lines) | stat: -rw-r--r-- 932 bytes parent folder | download | duplicates (4)
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');
}