Unverified Commit d89b9e4f authored by BTCxZelko's avatar BTCxZelko Committed by GitHub
Browse files

Under maintenance

parent 4c35b795
......@@ -10,126 +10,8 @@ NC='\033[0m'
echo -e "${RED}"
echo "***"
echo "Adding Electrs into Dojo stack..."
sleep 1s
echo "This will update your Dojo...this may take some time"
echo "Under Maintenance
echo "***"
echo -e "${NC}"
sleep 5s
# electrs branch of Dojo
cd ~/dojo/docker/my-dojo
sudo ./dojo.sh stop
mkdir ~/.dojo > /dev/null 2>&1
cd ~/.dojo
git clone -b feat_electrs https://github.com/RoninDojo/samourai-dojo.git
sudo cp -rv samourai-dojo/* ~/dojo
cd ~/dojo/docker/my-dojo/
sudo ./dojo.sh upgrade
<<<<<<< HEAD
# Configure Electrs
echo -e "${RED}"
echo "***"
echo "Editing the Electrs config.toml file..."
echo "***"
echo -e "${NC}"
sleep 2s
RPC_USER=$(sudo cat /home/$USER/dojo/docker/my-dojo/conf/docker-bitcoind.conf | grep BITCOIND_RPC_USER= | cut -c 19-)
RPC_PASS=$(sudo cat /home/$USER/dojo/docker/my-dojo/conf/docker-bitcoind.conf | grep BITCOIND_RPC_PASSWORD= | cut -c 23-)
sudo mkdir /home/$USER/.electrs
touch /home/$USER/config.toml
chmod 600 /home/$USER/config.toml || exit 1
cat > /home/$USER/config.toml <<EOF
verbose = 4
timestamp = true
jsonrpc_import = true
db_dir = "/mnt/usb/electrs/db"
cookie = "$RPC_USER:$RPC_PASS"
server_banner = "Welcome to your Ronin Personal Electrs Server!"
daemon_dir = "/mnt/usb/docker/volumes/my-dojo_bitcoind_data/_data"
daemon_rpc_addr = "127.0.0.1:28256"
EOF
sudo mv /home/$USER/config.toml /home/$USER/.electrs/config.toml
# move config file
sleep 2s
# edit torrc
echo -e "${RED}"
echo "***"
echo "Editting torrc..."
echo "***"
echo -e "${NC}"
sleep 2s
sudo sed -i '78i HiddenServiceDir /var/lib/tor/hidden_service/' /etc/tor/torrc
sudo sed -i '79i HiddenServiceVersion 3' /etc/tor/torrc
sudo sed -i '80i HiddenServicePort 50001 127.0.0.1:50001' /etc/tor/torrc
echo -e "${RED}"
echo "***"
echo "Restarting Tor..."
echo "***"
echo -e "${NC}"
sudo systemctl restart tor
sleep 3s
# sudo nano /etc/systemd/system/electrs.service
echo "
[Unit]
Description=Electrs
After=docker.service
[Service]
WorkingDirectory=/home/$USER/electrs
ExecStart=/home/$USER/electrs/target/release/electrs --electrum-rpc-addr="0.0.0.0:50001"
User=$USER
Group=$USER
Type=simple
KillMode=process
TimeoutSec=60
Restart=always
RestartSec=60
[Install]
WantedBy=multi-user.target
" | sudo tee -a /etc/systemd/system/electrs.service
echo -e "${RED}"
echo "***"
echo "Electrs will run in the background, and at startup. To disable go to Electrs menu."
echo "***"
echo -e "${NC}"
sleep 2s
sudo systemctl enable electrs
sleep 2s
echo -e "${RED}"
echo "***"
echo "Electrs is running!"
echo "***"
echo -e "${NC}"
sleep 2s
sudo systemctl start electrs
sleep 2s
TOR_ADDRESS=$(sudo cat /var/lib/tor/hidden_service/hostname)
echo -e "${RED}"
echo "The Tor Hidden Service address for electrs is:"
echo -e "${NC}"
echo "$TOR_ADDRESS"
sleep 5s
echo -e "${RED}"
=======
>>>>>>> electrs
echo "Electrum Wallet: To connect through Tor, open the Tor Browser, and start with the following options:"
sleep 1s
echo "For pairing with GUI see full guide: https://github.com/BTCxZelko/Ronin-Dojo/blob/master/RPi4/Manjaro/Minimal/Electrs.md"
sleep 5s
echo -e "${RED}"
echo "***"
echo "Complete!"
echo "***"
echo -e "${NC}"
sleep 2s
bash ~/RoninDojo/ronin
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment