mirror of
https://github.com/bitwarden/server.git
synced 2024-11-22 12:15:36 +01:00
[PM-294] Add Database to MSSQL Environment File (#2962)
This commit is contained in:
parent
0bdc4c3902
commit
b55d086c9e
@ -43,8 +43,8 @@ fi
|
|||||||
# Replace database name in backup-db.sql
|
# Replace database name in backup-db.sql
|
||||||
if [ ! -z "$DATABASE" ]
|
if [ ! -z "$DATABASE" ]
|
||||||
then
|
then
|
||||||
sed -i -e "/@DatabaseName /s/vault/$DATABASE/" backup-db.sql
|
sed -i "/^SET @DatabaseName =/s/'[^']*'/'$DATABASE'/" backup-db.sql
|
||||||
sed -i -e "/@DatabaseNameSafe /s/vault/${DATABASE// /-}/" backup-db.sql
|
sed -i "/^SET @DatabaseNameSafe =/s/'[^']*'/'${DATABASE// /-}'/" backup-db.sql
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# The rest...
|
# The rest...
|
||||||
|
@ -104,6 +104,7 @@ public class EnvironmentFileBuilder
|
|||||||
_mssqlOverrideValues = new Dictionary<string, string>
|
_mssqlOverrideValues = new Dictionary<string, string>
|
||||||
{
|
{
|
||||||
["SA_PASSWORD"] = dbPassword,
|
["SA_PASSWORD"] = dbPassword,
|
||||||
|
["DATABASE"] = _context.Install?.Database ?? "vault"
|
||||||
};
|
};
|
||||||
|
|
||||||
_keyConnectorOverrideValues = new Dictionary<string, string>
|
_keyConnectorOverrideValues = new Dictionary<string, string>
|
||||||
|
Loading…
Reference in New Issue
Block a user