mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-29 13:02:35 +02:00
Merge branch 'v1.5' of https://github.com/rootzoll/raspiblitz into v1.5
This commit is contained in:
@@ -80,7 +80,7 @@ l 'Lightning Loop' ${loop} \
|
||||
4 'Run behind TOR' ${runBehindTor} \
|
||||
5 'RTL Webinterface' ${rtlWebinterface} \
|
||||
b 'BTC-RPC-Explorer' ${BTCRPCexplorer} \
|
||||
s 'Cyryptoadvance Specter' ${specter} \
|
||||
s 'Cryptoadvance Specter' ${specter} \
|
||||
6 'LND Auto-Unlock' ${autoUnlock} \
|
||||
9 'Touchscreen' ${touchscreenMenu} \
|
||||
r 'LCD Rotate' ${lcdrotateMenu} \
|
||||
@@ -101,7 +101,7 @@ l 'Lightning Loop' ${loop} \
|
||||
4 'Run behind TOR' ${runBehindTor} \
|
||||
5 'RTL Webinterface' ${rtlWebinterface} \
|
||||
b 'BTC-RPC-Explorer' ${BTCRPCexplorer} \
|
||||
s 'Cyryptoadvance Specter' ${specter} \
|
||||
s 'Cryptoadvance Specter' ${specter} \
|
||||
6 'LND Auto-Unlock' ${autoUnlock} \
|
||||
7 'BTC UPnP (AutoNAT)' ${networkUPnP} \
|
||||
8 'LND UPnP (AutoNAT)' ${autoNatDiscovery} \
|
||||
|
@@ -93,7 +93,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo service bitcoind start
|
||||
|
||||
echo "*** Installing prerequisites ***"
|
||||
sudo apt install -y libusb-1.0.0-dev libudev-dev virtualenv
|
||||
sudo apt install -y libusb-1.0.0-dev libudev-dev virtualenv libssl-dev
|
||||
|
||||
# activating Authentication here ...
|
||||
echo "*** creating App-config ***"
|
||||
@@ -213,7 +213,7 @@ After=${network}d.service
|
||||
[Service]
|
||||
ExecStart=/home/bitcoin/.specter/.env/bin/python3 -m cryptoadvance.specter server --host 0.0.0.0 --cert=/home/bitcoin/.specter/cert.pem --key=/home/bitcoin/.specter/key.pem
|
||||
User=bitcoin
|
||||
Environment=PATH=/home/bitcoin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/bin
|
||||
Environment=PATH=/home/bitcoin/.specter/.env/bin:/home/bitcoin/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin:/bin
|
||||
Restart=always
|
||||
TimeoutSec=120
|
||||
RestartSec=30
|
||||
|
@@ -56,10 +56,10 @@ if [ "$1" = "status" ]; then
|
||||
echo "localTCPPortActive=${localPortRunning}"
|
||||
publicPortRunning=$(nc -z -w6 ${publicIP} 50001 2>/dev/null; echo $?)
|
||||
if [ "${publicPortRunning}" == "0" ]; then
|
||||
# OK looks good - but just means that somethingis answering on that port
|
||||
# OK looks good - but just means that something is answering on that port
|
||||
echo "publicTCPPortAnswering=1"
|
||||
else
|
||||
# no answere on that port
|
||||
# no answer on that port
|
||||
echo "publicTCPPortAnswering=0"
|
||||
fi
|
||||
echo "portHTTP='50002'"
|
||||
@@ -67,10 +67,10 @@ if [ "$1" = "status" ]; then
|
||||
echo "localHTTPPortActive=${localPortRunning}"
|
||||
publicPortRunning=$(nc -z -w6 ${publicIP} 50002 2>/dev/null; echo $?)
|
||||
if [ "${publicPortRunning}" == "0" ]; then
|
||||
# OK looks good - but just means that somethingis answering on that port
|
||||
# OK looks good - but just means that something is answering on that port
|
||||
echo "publicHTTPPortAnswering=1"
|
||||
else
|
||||
# no answere on that port
|
||||
# no answer on that port
|
||||
echo "publicHTTPPortAnswering=0"
|
||||
fi
|
||||
# add TOR info
|
||||
@@ -81,6 +81,9 @@ if [ "$1" = "status" ]; then
|
||||
else
|
||||
echo "TORrunning=0"
|
||||
fi
|
||||
# check Nginx
|
||||
nginxTest=$(sudo nginx -t 2>&1 | grep -c "test is successful")
|
||||
echo "nginxTest=$nginxTest"
|
||||
|
||||
else
|
||||
echo "isSynced=0"
|
||||
@@ -119,6 +122,23 @@ This can take multiple hours.
|
||||
" 9 48
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ ${nginxTest} -eq 0 ]; then
|
||||
dialog --title "Testing nginx.conf has failed" --msgbox "
|
||||
Nginx is in a failed state. Will attempt to fix.
|
||||
Try connecting via port 50002 or Tor again once finished.
|
||||
Check 'sudo nginx -t' for a detailed error message.
|
||||
" 9 61
|
||||
logFileMissing=$(sudo nginx -t 2>&1 | grep -c "/var/log/nginx/access.log")
|
||||
if [ ${logFileMissing} -eq 1 ]; then
|
||||
sudo mkdir /var/log/nginx
|
||||
sudo systemctl restart nginx
|
||||
fi
|
||||
/home/admin/config.scripts/internet.selfsignedcert.sh
|
||||
echo "Press ENTER to get back to main menu."
|
||||
read key
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Options (available without TOR)
|
||||
OPTIONS=( \
|
||||
@@ -138,7 +158,7 @@ This can take multiple hours.
|
||||
echo "https://electrum.org"
|
||||
echo
|
||||
echo "On Network Settings > Server menu:"
|
||||
echo "- deavtivate automatic server selection"
|
||||
echo "- deactivate automatic server selection"
|
||||
echo "- as manual server set '${localIP}' & '${portHTTP}'"
|
||||
echo "- laptop and RaspiBlitz need to be within same local network"
|
||||
echo
|
||||
@@ -146,11 +166,11 @@ This can take multiple hours.
|
||||
echo "electrum --oneserver --server ${localIP}:${portHTTP}:s"
|
||||
if [ ${TORrunning} -eq 1 ]; then
|
||||
echo ""
|
||||
echo "The TOR Hidden Service address for electrs is (see LCD for QR code):"
|
||||
echo "The Tor Hidden Service address for electrs is (see LCD for QR code):"
|
||||
echo "${TORaddress}"
|
||||
echo
|
||||
echo "To connect through TOR open the Tor Browser and start with the options:"
|
||||
echo "electrum --oneserver --server=$TOR_ADDRESS:50002:s --proxy socks5:127.0.0.1:9150"
|
||||
echo "electrum --oneserver --server${TORaddress}:50002:s --proxy socks5:127.0.0.1:9150"
|
||||
/home/admin/config.scripts/blitz.lcd.sh qr "${TORaddress}"
|
||||
fi
|
||||
echo
|
||||
|
@@ -30,7 +30,7 @@ if [ "$1" = "menu" ]; then
|
||||
whiptail --title " JoinMarket info " --msgbox "Usage:
|
||||
https://github.com/openoms/bitcoin-tutorials/blob/master/joinmarket/README.md\n
|
||||
Start to use by logging in to the 'joinmarket' user with:
|
||||
'sudo su - joinmarket' \n
|
||||
sudo su joinmarket\n
|
||||
Can log in directly with the 'joinmarket' user via ssh.
|
||||
The user password is the PASSWORD_B.
|
||||
" 14 81
|
||||
@@ -109,18 +109,15 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
pip install https://github.com/sunu/qt5reactor/archive/58410aaead2185e9917ae9cac9c50fe7b70e4a60.zip#egg=qt5reactor
|
||||
|
||||
# autostart for joinmarket
|
||||
if [ $(sudo cat /home/joinmarket/.bashrc | grep -c "bash startup.sh") -eq 0 ]; then
|
||||
sudo bash -c "echo 'bash startup.sh' >> /home/joinmarket/.bashrc"
|
||||
fi
|
||||
if [ $(sudo cat /home/joinmarket/.bashrc | grep -c ". /home/joinmarket/joinmarket-clientserver/jmvenv/bin/activate") -eq 0 ]; then
|
||||
sudo bash -c "echo '. /home/joinmarket/joinmarket-clientserver/jmvenv/bin/activate' >> /home/joinmarket/.bashrc"
|
||||
fi
|
||||
if [ $(sudo cat /home/joinmarket/.bashrc | grep -c "/home/joinmarket/joinmarket-clientserver/jmvenv/bin/python -c \"import PySide2\"") -eq 0 ]; then
|
||||
sudo bash -c "echo '/home/joinmarket/joinmarket-clientserver/jmvenv/bin/python -c \"import PySide2\"' >> /home/joinmarket/.bashrc"
|
||||
fi
|
||||
if [ $(sudo cat /home/joinmarket/.bashrc | grep -c "cd /home/joinmarket/joinmarket-clientserver/scripts/") -eq 0 ]; then
|
||||
sudo bash -c "echo 'cd /home/joinmarket/joinmarket-clientserver/scripts/' >> /home/joinmarket/.bashrc"
|
||||
fi
|
||||
bash -c "echo '# automatically start startup.sh for joinmarket unless' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo '# when running in a tmux session' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo 'if [ -z \"\$TMUX\" ]; then' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo ' /home/joinmarket/startup.sh' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo 'fi' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo '# always activate jmvenv with PySide2 and cd to scripts' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo '. /home/joinmarket/joinmarket-clientserver/jmvenv/bin/activate' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo '/home/joinmarket/joinmarket-clientserver/jmvenv/bin/python -c \"import PySide2\"' >> /home/joinmarket/.bashrc"
|
||||
bash -c "echo 'cd /home/joinmarket/joinmarket-clientserver/scripts/' >> /home/joinmarket/.bashrc"
|
||||
|
||||
cat > /home/admin/startup.sh <<EOF
|
||||
# check for joinmarket.cfg
|
||||
@@ -142,19 +139,19 @@ else
|
||||
sudo chmod 600 /home/joinmarket/.joinmarket/joinmarket.cfg || exit 1
|
||||
echo ""
|
||||
echo "Editing the joinmarket.cfg"
|
||||
sudo sed -i "s/^rpc_user =.*/rpc_user = raspibolt/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^rpc_user =.*/rpc_user = raspibolt/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
PASSWORD_B=\$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-)
|
||||
sudo sed -i "s/^rpc_password =.*/rpc_password = \$PASSWORD_B/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^rpc_password =.*/rpc_password = \$PASSWORD_B/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
echo "Filled the bitcoin RPC password (PASSWORD_B)"
|
||||
#communicate with IRC servers via Tor
|
||||
sudo sed -i "s/^host = irc.darkscience.net/#host = irc.darkscience.net/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sudo sed -i "s/^#host = darksci3bfoka7tw.onion/host = darksci3bfoka7tw.onion/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sudo sed -i "s/^host = irc.hackint.org/#host = irc.hackint.org/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sudo sed -i "s/^#host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion/host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sudo sed -i "s/^socks5 = false/#socks5 = false/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sudo sed -i "s/^#socks5 = true/socks5 = true/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sudo sed -i "s/^#port = 6667/port = 6667/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sudo sed -i "s/^#usessl = false/usessl = false/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^host = irc.darkscience.net/#host = irc.darkscience.net/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^#host = darksci3bfoka7tw.onion/host = darksci3bfoka7tw.onion/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^host = irc.hackint.org/#host = irc.hackint.org/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^#host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion/host = ncwkrwxpq2ikcngxq3dy2xctuheniggtqeibvgofixpzvrwpa77tozqd.onion/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^socks5 = false/#socks5 = false/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^#socks5 = true/socks5 = true/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^#port = 6667/port = 6667/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
sed -i "s/^#usessl = false/usessl = false/g" /home/joinmarket/.joinmarket/joinmarket.cfg
|
||||
echo "Edited the joinmarket.cfg to communicate over Tor only."
|
||||
echo ""
|
||||
echo "Welcome to the JoinMarket command line!"
|
||||
@@ -167,12 +164,13 @@ else
|
||||
fi
|
||||
EOF
|
||||
|
||||
sudo mv /home/admin/startup.sh /home/joinmarket/startup.sh
|
||||
sudo chown joinmarket:joinmarket /home/joinmarket/startup.sh
|
||||
mv /home/admin/startup.sh /home/joinmarket/startup.sh
|
||||
chown joinmarket:joinmarket /home/joinmarket/startup.sh
|
||||
chmod +x /home/joinmarket/startup.sh
|
||||
|
||||
else
|
||||
echo "JoinMarket is already installed"
|
||||
echo ""
|
||||
echo "JoinMarket is already installed"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [ -f "/home/joinmarket/joinmarket-clientserver/jmvenv/bin/activate" ] ; then
|
||||
@@ -181,7 +179,7 @@ EOF
|
||||
# starting info
|
||||
echo ""
|
||||
echo "Start to use by logging in to the 'joinmarket' user with:"
|
||||
echo "'sudo su - joinmarket'"
|
||||
echo "sudo su joinmarket"
|
||||
echo ""
|
||||
echo "If logging in directly via ssh the password is the PASSWORD_B"
|
||||
echo ""
|
||||
|
@@ -47,7 +47,7 @@ if [ "${runBehindTor}" = "on" ]; then
|
||||
isHiddenService=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c $service)
|
||||
if [ ${isHiddenService} -eq 0 ]; then
|
||||
#check if the port is already forwarded
|
||||
alreadyThere=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c 127.0.0.1:$fromPort)
|
||||
alreadyThere=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c "\b127.0.0.1:$fromPort\b")
|
||||
if [ ${alreadyThere} -gt 0 ]; then
|
||||
echo "The port $fromPort is already forwarded. Check /etc/tor/torrc for the details."
|
||||
exit 1
|
||||
@@ -60,7 +60,7 @@ HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc
|
||||
|
||||
# check and insert second port pair
|
||||
if [ ${#toPort2} -gt 0 ]; then
|
||||
alreadyThere=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c 127.0.0.1:$fromPort2)
|
||||
alreadyThere=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c "\b127.0.0.1:$fromPort2\b")
|
||||
if [ ${alreadyThere} -gt 0 ]; then
|
||||
echo "The port $fromPort2 is already forwarded. Check the /etc/tor/torrc for the details."
|
||||
else
|
||||
@@ -91,7 +91,7 @@ HiddenServicePort $toPort 127.0.0.1:$fromPort" | sudo tee -a /etc/tor/torrc
|
||||
echo "$TOR_ADDRESS"
|
||||
echo "use with the port: $toPort"
|
||||
echo ""
|
||||
alreadyThere=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c 127.0.0.1:$fromPort2)
|
||||
alreadyThere=$(sudo cat /etc/tor/torrc 2>/dev/null | grep -c "\b127.0.0.1:$fromPort2\b")
|
||||
if [ ${#toPort2} -gt 0 ]; then
|
||||
if [ ${alreadyThere} -eq 0 ]; then
|
||||
echo "or the port: $toPort2"
|
||||
|
Reference in New Issue
Block a user