1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-02 00:22:50 -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:
Vince Grassia
2021-07-02 10:52:34 -04:00
committed by GitHub
parent 86a12efa76
commit bdcfbb3b43
10 changed files with 73 additions and 27 deletions

View File

@ -75,12 +75,21 @@ function install() {
--email $EMAIL -d $DOMAIN --logs-dir /etc/letsencrypt/logs
fi
fi
echo -e -n "${CYAN}(!)${NC} Enter the database name for your Bitwarden instance (ex. vault): "
read DATABASE
echo ""
if [ "$DATABASE" == "" ]
then
DATABASE="vault"
fi
pullSetup
docker run -it --rm --name setup -v $OUTPUT_DIR:/bitwarden \
--env-file $ENV_DIR/uid.env bitwarden/setup:$COREVERSION \
dotnet Setup.dll -install 1 -domain $DOMAIN -letsencrypt $LETS_ENCRYPT -os $OS \
-corev $COREVERSION -webv $WEBVERSION
-corev $COREVERSION -webv $WEBVERSION -dbname "$DATABASE"
}
function dockerComposeUp() {