die early if db connection fails
This commit is contained in:
parent
d59697b9b5
commit
58ae7bb342
|
@ -119,6 +119,9 @@ GetOptions(
|
|||
) or pod2usage(-exitstatus => -1);
|
||||
|
||||
my $dbh = zmDbConnect(undef, { mysql_multi_statements=>1 } );
|
||||
if ( !$dbh ) {
|
||||
die "Unable to connect to db\n";
|
||||
}
|
||||
$Config{ZM_DB_USER} = $dbUser;
|
||||
$Config{ZM_DB_PASS} = $dbPass;
|
||||
# we escape dbpass with single quotes so that $ in the password has no effect, but dbpass could have a ' in it.
|
||||
|
|
Loading…
Reference in New Issue