mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-04 20:12:37 +02:00
#214 deactivate nginx for BTCPay over TOR
This commit is contained in:
@@ -22,11 +22,9 @@ if [ "$1" = "menu" ]; then
|
|||||||
|
|
||||||
# TOR
|
# TOR
|
||||||
/home/admin/config.scripts/blitz.lcd.sh qr "${toraddress}"
|
/home/admin/config.scripts/blitz.lcd.sh qr "${toraddress}"
|
||||||
whiptail --title " BTCPay Server (TOR) " --msgbox "Open the following URL in your local web browser:
|
whiptail --title " BTCPay Server (TOR) " --msgbox "Have TOR Browser installed on your laptop and open:\n
|
||||||
https://${localip}:23001
|
${toraddress}\n
|
||||||
You need to accept the selfsigned certificate in browser.\n
|
See LCD of RaspiBlitz for QR code of this address if you want to open on mobile devices with TOR browser.
|
||||||
Hidden Service address for TOR Browser (QR see LCD):
|
|
||||||
${toraddress}
|
|
||||||
" 12 67
|
" 12 67
|
||||||
/home/admin/config.scripts/blitz.lcd.sh hide
|
/home/admin/config.scripts/blitz.lcd.sh hide
|
||||||
else
|
else
|
||||||
@@ -43,10 +41,13 @@ in README of https://github.com/rootzoll/raspiblitz
|
|||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# add default value to raspi config if needed
|
# add default values to raspi config if needed
|
||||||
if ! grep -Eq "^BTCPayServer=" /mnt/hdd/raspiblitz.conf; then
|
if ! grep -Eq "^BTCPayServer=" /mnt/hdd/raspiblitz.conf; then
|
||||||
echo "BTCPayServer=off" >> /mnt/hdd/raspiblitz.conf
|
echo "BTCPayServer=off" >> /mnt/hdd/raspiblitz.conf
|
||||||
fi
|
fi
|
||||||
|
if ! grep -Eq "^BTCPayDomain=" /mnt/hdd/raspiblitz.conf; then
|
||||||
|
echo "BTCPayDomain=off" >> /mnt/hdd/raspiblitz.conf
|
||||||
|
fi
|
||||||
|
|
||||||
# stop services
|
# stop services
|
||||||
echo "making sure services are not running"
|
echo "making sure services are not running"
|
||||||
@@ -57,13 +58,17 @@ sudo systemctl stop btcpayserver 2>/dev/null
|
|||||||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||||
echo "*** INSTALL BTCPAYSERVER ***"
|
echo "*** INSTALL BTCPAYSERVER ***"
|
||||||
|
|
||||||
|
# --> just serving directly thru TOR for now
|
||||||
# setting up nginx and the SSL certificate
|
# setting up nginx and the SSL certificate
|
||||||
/home/admin/config.scripts/bonus.btcpaysetdomain.sh
|
#/home/admin/config.scripts/bonus.btcpaysetdomain.sh
|
||||||
errorOnInstall=$?
|
#errorOnInstall=$?
|
||||||
if [ ${errorOnInstall} -eq 1 ]; then
|
#if [ ${errorOnInstall} -eq 1 ]; then
|
||||||
echo "exiting as user cancelled BTCPayServer installation"
|
# echo "exiting as user cancelled BTCPayServer installation"
|
||||||
exit 1
|
# exit 1
|
||||||
fi
|
#fi
|
||||||
|
sudo sed -i "s/^BTCPayDomain=.*/BTCPayDomain='localhost'/g" /mnt/hdd/raspiblitz.conf
|
||||||
|
/home/admin/config.scripts/internet.hiddenservice.sh btcpay 80 23000
|
||||||
|
|
||||||
# check for $BTCPayDomain
|
# check for $BTCPayDomain
|
||||||
source /mnt/hdd/raspiblitz.conf
|
source /mnt/hdd/raspiblitz.conf
|
||||||
|
|
||||||
|
@@ -5,42 +5,40 @@ source /mnt/hdd/raspiblitz.conf
|
|||||||
# script to set up nginx and the SSL certificate for BTCPay Server
|
# script to set up nginx and the SSL certificate for BTCPay Server
|
||||||
# calls the config.scripts/internet.hiddenservice.sh for the Tor connection
|
# calls the config.scripts/internet.hiddenservice.sh for the Tor connection
|
||||||
|
|
||||||
########## Deactivated IP/DOMAIN for now - using TOR as default ###########
|
HEIGHT=20
|
||||||
#HEIGHT=20
|
WIDTH=73
|
||||||
#WIDTH=73
|
CHOICE_HEIGHT=2
|
||||||
#CHOICE_HEIGHT=2
|
BACKTITLE="RaspiBlitz"
|
||||||
#BACKTITLE="RaspiBlitz"
|
TITLE="BTCPay Server Install"
|
||||||
#TITLE="BTCPay Server Install"
|
MENU="Choose 'TOR' if you want to set up BTCPayServer
|
||||||
#MENU="Choose 'TOR' if you want to set up BTCPayServer
|
as a Tor Hidden service and use a self signed SSL certificate.\n\n
|
||||||
#as a Tor Hidden service and use a self signed SSL certificate.\n\n
|
Choose 'DOMAIN' if you want to use a Domain Name or dynamicDNS
|
||||||
#Choose 'DOMAIN' if you want to use a Domain Name or dynamicDNS
|
pointing to your public IP. You will need to forward ports from your
|
||||||
#pointing to your public IP. You will need to forward ports from your
|
router to your RaspiBlitz and an email address to be used for
|
||||||
#router to your RaspiBlitz and an email address to be used for
|
communication about the SSL certificate (very experimental).\n\n
|
||||||
#communication about the SSL certificate (very experimental).\n\n
|
For details or troubleshoot check for 'BTCPay'
|
||||||
#For details or troubleshoot check for 'BTCPay'
|
in README of https://github.com/rootzoll/raspiblitz"
|
||||||
#in README of https://github.com/rootzoll/raspiblitz"
|
OPTIONS=(TOR "Tor access and a self-signed certificate"\
|
||||||
#OPTIONS=(TOR "Tor access and a self-signed certificate"\
|
DOMAIN "(Dynamic) Domain Name (experimental)")
|
||||||
# DOMAIN "(Dynamic) Domain Name (experimental)")
|
|
||||||
#
|
CHOICE=$(dialog --clear \
|
||||||
#CHOICE=$(dialog --clear \
|
--backtitle "$BACKTITLE" \
|
||||||
# --backtitle "$BACKTITLE" \
|
--title "$TITLE" \
|
||||||
# --title "$TITLE" \
|
--menu "$MENU" \
|
||||||
# --menu "$MENU" \
|
$HEIGHT $WIDTH $CHOICE_HEIGHT \
|
||||||
# $HEIGHT $WIDTH $CHOICE_HEIGHT \
|
"${OPTIONS[@]}" \
|
||||||
# "${OPTIONS[@]}" \
|
2>&1 >/dev/tty)
|
||||||
# 2>&1 >/dev/tty)
|
|
||||||
#
|
dialogcancel=$?
|
||||||
#dialogcancel=$?
|
echo "done dialog"
|
||||||
#echo "done dialog"
|
clear
|
||||||
#clear
|
|
||||||
#
|
# check if user canceled dialog
|
||||||
## check if user canceled dialog
|
echo "dialogcancel(${dialogcancel})"
|
||||||
#echo "dialogcancel(${dialogcancel})"
|
if [ ${dialogcancel} -eq 1 ]; then
|
||||||
#if [ ${dialogcancel} -eq 1 ]; then
|
echo "user cancelled"
|
||||||
# echo "user cancelled"
|
exit 1
|
||||||
# exit 1
|
fi
|
||||||
#fi
|
|
||||||
CHOICE="TOR"
|
|
||||||
|
|
||||||
clear
|
clear
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
|
Reference in New Issue
Block a user