IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 30, 2008, 12:44:12 PM (18 years ago)
Author:
jhoblitt
Message:

add --host option to neb-initdb
add --host option to neb-addvol

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Nebulous-Server/bin/neb-initdb

    r13074 r18386  
    33# Copyright (C) 2005-2007  Joshua Hoblitt
    44#
    5 # $Id: neb-initdb,v 1.7 2007-04-28 01:19:59 jhoblitt Exp $
     5# $Id: neb-initdb,v 1.8 2008-06-30 22:44:12 jhoblitt Exp $
    66
    77use strict;
     
    99
    1010use vars qw( $VERSION );
    11 $VERSION = '0.02';
     11$VERSION = '0.03';
    1212
    1313use DBI;
     
    1717use Pod::Usage qw( pod2usage );
    1818
    19 my ($db, $dbuser, $dbpass);
     19my ($db, $dbhost, $dbuser, $dbpass);
    2020
    2121$db     = $ENV{'NEB_DB'} unless $db;
     22$dbhost = $ENV{'NEB_DBHOST'} || 'localhost';
    2223$dbuser = $ENV{'NEB_USER'} unless $dbuser;
    2324$dbpass = $ENV{'NEB_PASS'} unless $dbpass;
     
    2526GetOptions(
    2627    'db=s'      => \$db,
     28    'host=s'    => \$dbhost,
    2729    'user=s'    => \$dbuser,
    2830    'pass=s'    => \$dbpass,
     
    3436
    3537my $dbh = DBI->connect(
    36     "DBI:mysql:database=$db:host=localhost",
     38    "DBI:mysql:database=$db:host=$dbhost",
    3739    $dbuser,
    3840    $dbpass,
Note: See TracChangeset for help on using the changeset viewer.