lbry-sdk/docker/wallet_server_entrypoint.sh

16 lines
510 B
Bash
Raw Normal View History

2019-09-16 15:51:22 +02:00
#!/bin/bash
# entrypoint for wallet server Docker image
SNAPSHOT_URL="${SNAPSHOT_URL:-}" #off by default. latest snapshot at https://lbry.com/snapshot/wallet
if [[ -n "$SNAPSHOT_URL" ]] && [[ ! -f /database/claims.db ]]; then
echo "Downloading wallet snapshot from $SNAPSHOT_URL"
2019-11-04 22:50:03 +01:00
wget --no-verbose -O wallet_snapshot.tar.bz2 "$SNAPSHOT_URL"
2019-09-16 15:51:22 +02:00
echo "Extracting snapshot..."
tar xvjf wallet_snapshot.tar.bz2 --directory /database
rm wallet_snapshot.tar.bz2
fi
/home/lbry/.local/bin/torba-server "$@"