IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

adding DBSERVER use instead of hardcoded name

File:
1 edited

Legend:

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

    r31906 r34010  
    15881588
    15891589sub init_gpc_db {
     1590    ## change to use the site.config setting now, however may want to use replicated scidbs instead
     1591    my $ipprc =  PS::IPP::Config->new(); # IPP Configuration
     1592    my $siteConfig = $ipprc->{_siteConfig};
    15901593    use constant DB_SOCKET => '/var/run/mysqld/mysqld.sock';
    1591     my $dbserver = 'ippdb01';
     1594    # my $dbserver = 'ippdb01';
    15921595    my $dbuser = 'ippuser';
    15931596    my $dbpass = 'ippuser';
     1597    my $dbserver = metadataLookupStr($siteConfig, 'DBSERVER');
     1598    die "database configuration set up" unless defined($dbserver);
    15941599    $db = DBI->connect("DBI:mysql:database=${dbname};host=${dbserver};" .
    15951600                       "mysql_socket=" . DB_SOCKET(),
Note: See TracChangeset for help on using the changeset viewer.