-
Notifications
You must be signed in to change notification settings - Fork 53
/
electrum_wallet.sh
94 lines (79 loc) · 2.63 KB
/
electrum_wallet.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Download and run this script on a DEbian / Ubuntu desktop:
# Download
# wget https://raw.githubusercontent.com/openoms/bitcoin-tutorials/master/electrs/electrum_wallet.sh
# Run:
# bash electrum_wallet.sh
echo "
# Enter the version of Electrum Wallet to install.
# Find the latest version number at:
# https://electrum.org/#download
# For example:
4.1.5"
read electrumVersion
echo "
# Install dependencies: python3-pyqt5 and libsecp256k1-0
"
sudo apt-get install -y python3-pyqt5 libsecp256k1-0
echo "
# Download the package:
# https://download.electrum.org/$electrumVersion/Electrum-$electrumVersion.tar.gz
"
rm -f Electrum-$electrumVersion.tar.gz.*
wget https://download.electrum.org/$electrumVersion/Electrum-$electrumVersion.tar.gz
echo "
# Verify signature
"
rm -f ThomasV.asc
wget https://raw.githubusercontent.com/spesmilo/electrum/master/pubkeys/ThomasV.asc
gpg --import ThomasV.asc
wget https://download.electrum.org/$electrumVersion/Electrum-$electrumVersion.tar.gz.ThomasV.asc
verifyResult=$(gpg --verify Electrum-$electrumVersion.tar.gz.ThomasV.asc Electrum-$electrumVersion.tar.gz 2>&1)
goodSignature=$(echo ${verifyResult} | grep 'Good signature' -c)
echo "goodSignature(${goodSignature})"
if [ ${goodSignature} -lt 1 ]; then
echo ""
echo "!!! BUILD FAILED --> PGP Verify not OK / signature(${goodSignature})"
exit 1
fi
echo "
# Installing with the command:
# python3 -m pip install --user Electrum-$electrumVersion.tar.gz[fast]
"
# Run without installing: tar -xvf Electrum-$electrumVersion.tar.gz
# python3 Electrum-$electrumVersion/run_electrum
# Install with PIP:
sudo apt-get install -y python3-setuptools python3-pip
python3 -m pip install --user Electrum-$electrumVersion.tar.gz[fast]
isInPath=$(echo $PATH | grep -c ~/.local/bin)
if [ $isInPath -eq 0 ]; then
echo
echo "add install dir to PATH"
PATH=$PATH:~/.local/bin
touch ~/.profile
export PATH
echo "PATH=$PATH" | tee -a ~/.profile
else
echo
echo "The install dir is already in the PATH"
fi
echo "
To start use:
'electrum --oneserver --server YOUR_ELECTRUM_SERVER_IP:50002:s'
To start with your custom server now and save the setting:
type the LAN_IP_ADDRESS of your Electrum Server followed by [ENTER]:"
read RASPIBLITZ_IP
echo "
Make the oneserver config persist (editing ~/.electrum/config)
"
electrum setconfig oneserver true
electrum setconfig server $RASPIBLITZ_IP:50002:s
echo "
# To run with the chosen server, just use:
'electrum'
# To change the preset server:
# edit the file ~/.electrum/config and change:
\"server\": \"<your__ IP_domain_or_dynDNS>:50002:s\"
# or
\"server\": \"toraddress.onion:50001:t\"
"
electrum --oneserver --server $RASPIBLITZ_IP:50002:s