IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 13, 2012, 4:45:18 PM (14 years ago)
Author:
mhuber
Message:

adding DBSERVER use instead of hardcoded name

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippScripts/scripts/nightly_science.pl

    r33863 r34008  
    20522052
    20532053sub init_gpc_db {
     2054    ## change to use the site.config setting, however may want to use replicated scidbs instead
     2055    my $ipprc =  PS::IPP::Config->new(); # IPP Configuration
     2056    my $siteConfig = $ipprc->{_siteConfig};
    20542057    use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
    2055     my $dbserver = 'ippdb01';
     2058    # my $dbserver = 'ippdb01';
    20562059    my $dbuser = 'ippuser';
    20572060    my $dbpass = 'ippuser';
     2061    my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER');
     2062    die "database configuration not set up" unless defined($dbserver);
    20582063    $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" .
    20592064                       "mysql_socket=" . DB_SOCKET(),
Note: See TracChangeset for help on using the changeset viewer.