Created update script for ledger-cli using simplefin
This commit is contained in:
21
ledger/setup.sh
Normal file
21
ledger/setup.sh
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
read -p "Enter your setup token: " token
|
||||
|
||||
while : ; do
|
||||
read -sp "Enter password: " password
|
||||
echo
|
||||
read -sp "Confirm password: " confirmed
|
||||
echo
|
||||
[[ "$password" == "$confirmed" ]] && break || echo "Passwords are not equal."
|
||||
echo
|
||||
done
|
||||
|
||||
CLAIM_URL="$(echo "$token" | base64 -d)"
|
||||
ACCESS_URL="$(curl -H "Content-Length: 0" -X POST "$CLAIM_URL")"
|
||||
|
||||
echo "Claim URL: $CLAIM_URL"
|
||||
echo "Access URL: $ACCESS_URL"
|
||||
|
||||
echo "$ACCESS_URL" | openssl aes-256-cbc -salt -a -pbkdf2 -iter 1000000 -pass "pass:$password" > ~/.simplefin.enc
|
||||
|
||||
Reference in New Issue
Block a user