add lines to change the ZM_DB_USER and ZM_DB_PASS when the user and password are supplied on the command line.
This is neccessary when the regular zm user does not have alter privileges.
This commit is contained in:
parent
543a1f2490
commit
34bfcb5e7e
|
@ -98,6 +98,11 @@ if ( !GetOptions( 'check'=>\$check, 'freshen'=>\$freshen, 'rename'=>\$rename, 'z
|
||||||
Usage();
|
Usage();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $dbh = zmDbConnect();
|
||||||
|
*ZM_DB_USER = sub { $dbUser } if ZM_DB_USER ne $dbUser;
|
||||||
|
*ZM_DB_PASS = sub { $dbPass } if ZM_DB_PASS ne $dbPass;
|
||||||
|
zmDbDisconnect();
|
||||||
|
|
||||||
if ( ! ($check || $freshen || $rename || $zoneFix || $migrateEvents || $version) )
|
if ( ! ($check || $freshen || $rename || $zoneFix || $migrateEvents || $version) )
|
||||||
{
|
{
|
||||||
if ( ZM_DYN_DB_VERSION )
|
if ( ZM_DYN_DB_VERSION )
|
||||||
|
|
Loading…
Reference in New Issue