From 18eacf97eca66d811b1abb4eacabe219d6ec46f4 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Tue, 20 Feb 2024 11:27:21 -0300 Subject: [PATCH] Made it compatible with any bitwarden instance --- entrypoint.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/entrypoint.sh b/entrypoint.sh index abc8f60..a0dca1d 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,8 +1,11 @@ #!/bin/sh -# Login to a VaultWarden instance -echo "Connecting to Vaultwarden instance at $VAULTWARDEN_URL" -bw config server "$VAULTWARDEN_URL" +# Login to a custom Bitwarden instance +if [ "$BITWARDEN_URL" ]; then + echo "Connecting to Bitwarden instance at $BITWARDEN_URL" + bw config server "$BITWARDEN_URL" +fi + BW_SESSION="$(bw login --raw)" export BW_SESSION @@ -13,7 +16,7 @@ export BW_PATH DATABASE_PATH="/exports/$DATABASE_NAME" export DATABASE_PATH -# Convert the VaultWarden data to a KeePass file +# Convert the Bitwarden data to a KeePass file bw sync python3 bitwarden-to-keepass.py bw lock