3 electrum_config="/etc/electrum.conf"
5 if [ ! -f $electrum_config ]; then
6 echo "$electrum_config does not exist"
10 path=`grep path_fulltree $electrum_config |awk -F\= '{print $2}'`
12 #needs more hardening against double definiton of variable, dismiss commented ones
14 if ! [ "$path" ]; then
15 echo "Variable path_fulltree not set in $electrum_config"
17 # we're actually forcing fulltree with this clause, which is ok if displaying v0.9 should use fulltree
20 if [ ! -d $path ]; then
21 echo "Database not found in $path."
22 read -p "Do you want to download it from the Electrum foundry to $path ? " -n 1 -r
24 if [[ $REPLY =~ ^[Yy]$ ]]; then
25 wget -O - "http://foundry.electrum.org/leveldb-dump/electrum-fulltree-100-latest.tar" | tar -C $path --strip-components 1 -xvf -
29 echo "starting server as daemon"
30 nohup /usr/bin/python -u server.py &> /var/log/electrum.log &