From 9512e38a375111d6ecbdc720c16cbc053017cdfc Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 17 Feb 2014 19:35:48 +0100 Subject: [PATCH] add foundry script --- start | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/start b/start index a48c432..36c01ea 100755 --- a/start +++ b/start @@ -1,2 +1,19 @@ #!/bin/bash + +path=`grep path_fulltree /etc/electrum.conf |awk -F\= '{print $2}'` + +if [ ! -d $path ]; then + echo "Database not found in $path." + read -p "Do you want to download it from the Electrum foundry? " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + rm -rf fulltree fulltree.tar + wget http://ecdsa.net/fulltree.tar + tar -xvf fulltree.tar + mv fulltree $path + rm -rf fulltree fulltree.tar + fi +fi + +echo "starting server as daemon" nohup /usr/bin/python -u server.py &> /var/log/electrum.log & -- 1.7.1