mirror of
https://github.com/bitwarden/server.git
synced 2025-06-30 07:36:14 -05:00
Allow for changing database name (#1397)
* Remove hard coded database name * Update permissions on build scripts * Update Setup project and run scripts for configuring database name * Remove hyphen from database name flag * Update with suggested changes, still needs testing * Revert SQL statements to concatenantion for testing * Fix typo * Update util/Setup/EnvironmentFileBuilder.cs Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com> * Update SQL commands to prevent SQL injection attacks Co-authored-by: Chad Scharf <3904944+cscharf@users.noreply.github.com>
This commit is contained in:
@ -40,6 +40,13 @@ then
|
||||
export SA_PASSWORD=$(cat $SA_PASSWORD_FILE)
|
||||
fi
|
||||
|
||||
# Replace database name in backup-db.sql
|
||||
if [ ! -z "$DATABASE" ]
|
||||
then
|
||||
sed -i -e "/@DatabaseName /s/vault/$DATABASE/" backup-db.sql
|
||||
sed -i -e "/@DatabaseNameSafe /s/vault/${DATABASE// /-}/" backup-db.sql
|
||||
fi
|
||||
|
||||
# The rest...
|
||||
|
||||
mkdir -p /etc/bitwarden/mssql/backups
|
||||
|
Reference in New Issue
Block a user