mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 12:06:36 +02:00
Merge branch 'v1.4' of https://github.com/rootzoll/raspiblitz into v1.4
This commit is contained in:
@@ -507,7 +507,7 @@ if [ "${BTCPayServer}" != "${choice}" ]; then
|
||||
if [ "${choice}" = "on" ]; then
|
||||
if [ ${errorOnInstall} -eq 0 ]; then
|
||||
source /home/btcpay/.btcpayserver/Main/settings.config
|
||||
if [ ${externalurl} = "https://" ]; then
|
||||
if [ ${externalurl} = "https://localhost" ]; then
|
||||
localip=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1 -d'/')
|
||||
externalurl="https://$localip\n
|
||||
Will need to accept the self-signed certificate in the \
|
||||
@@ -550,10 +550,8 @@ if [ "${lndmanage}" != "${choice}" ]; then
|
||||
if [ "${choice}" = "on" ]; then
|
||||
whiptail --title " Installed lndmanage " --msgbox "\
|
||||
Usage: https://github.com/bitromortac/lndmanage/blob/master/README.md\n
|
||||
Start with the line:
|
||||
'cd lndmanage & source venv/bin/activate & lndmanage'\n
|
||||
To exit: type 'deactivate' and press ENTER
|
||||
" 12 75
|
||||
To start type: 'manage' in the command line.
|
||||
" 9 75
|
||||
fi
|
||||
needsReboot=0
|
||||
else
|
||||
|
@@ -76,7 +76,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# make sure that txindex of blockchain is switched on
|
||||
/home/admin/config.scripts/network.txindex.sh on
|
||||
|
||||
npm install -g btc-rpc-explorer@1.1.3
|
||||
npm install -g btc-rpc-explorer@1.1.8
|
||||
|
||||
# prepare .env file
|
||||
echo "getting RPC credentials from the ${network}.conf"
|
||||
|
@@ -32,6 +32,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "exiting as user cancelled BTCPayServer installation"
|
||||
exit 1
|
||||
fi
|
||||
# check for $BTCPayDomain
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
isInstalled=$(sudo ls /etc/systemd/system/btcpayserver.service 2>/dev/null | grep -c 'btcpayserver.service')
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
@@ -40,14 +42,19 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
cd /home/btcpay
|
||||
|
||||
# store BTCpay data on HDD
|
||||
sudo mkdir /mnt/hdd/app-data/btcpayserver 2>/dev/null
|
||||
sudo mkdir /mnt/hdd/app-data/.btcpayserver 2>/dev/null
|
||||
|
||||
# move old btcpay data to app-data
|
||||
sudo mv -f /mnt/hdd/.btcpayserver/* /mnt/hdd/app-data/btcpayserver/ 2>/dev/null
|
||||
sudo rm -f /mnt/hdd/.btcpayserver 2>/dev/null
|
||||
sudo mv -f /mnt/hdd/.btcpayserver/* /mnt/hdd/app-data/.btcpayserver/ 2>/dev/null
|
||||
sudo rm -rf /mnt/hdd/.btcpayserver 2>/dev/null
|
||||
|
||||
# clean dirty SDcard (from before v1.4)
|
||||
sudo mv -f /home/btcpay/.btcpayserver/* /mnt/hdd/app-data/.btcpayserver/ 2>/dev/null
|
||||
sudo rm -rf /home/btcpay/.btcpayserver 2>/dev/null
|
||||
|
||||
sudo chown -R btcpay:btcpay /mnt/hdd/app-data/btcpayserver
|
||||
sudo ln -s /mnt/hdd/app-data/btcpayserver /home/btcpay/ 2>/dev/null
|
||||
sudo chown -R btcpay:btcpay /mnt/hdd/app-data/.btcpayserver
|
||||
sudo -u btcpay ln -s /mnt/hdd/app-data/.btcpayserver /home/btcpay/ 2>/dev/null
|
||||
sudo chown -R btcpay:btcpay /home/btcpay/.btcpayserver
|
||||
|
||||
echo ""
|
||||
echo "***"
|
||||
@@ -81,6 +88,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo -u btcpay mkdir /home/btcpay/dotnet
|
||||
sudo -u btcpay tar -xvf ${dotnetName} -C /home/btcpay/dotnet
|
||||
sudo -u btcpay tar -xvf ${aspnetcoreName} -C /home/btcpay/dotnet
|
||||
sudo rm -f *.tar.gz*
|
||||
|
||||
# opt out of telemetry
|
||||
echo "DOTNET_CLI_TELEMETRY_OPTOUT=1" | sudo tee -a /etc/environment
|
||||
@@ -124,7 +132,7 @@ PrivateDevices=true
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
" | sudo tee -a /etc/systemd/system/nbxplorer.service
|
||||
" | sudo tee /etc/systemd/system/nbxplorer.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
# restart to create settings.config if was running already
|
||||
@@ -173,9 +181,10 @@ EOF
|
||||
sudo -u btcpay git clone https://github.com/btcpayserver/btcpayserver.git
|
||||
cd btcpayserver
|
||||
# https://github.com/btcpayserver/btcpayserver/releases
|
||||
sudo -u btcpay git reset --hard v1.0.3.144
|
||||
sudo -u btcpay ./build.sh
|
||||
|
||||
sudo -u btcpay git reset --hard v1.0.3.150
|
||||
# sudo -u btcpay ./build.sh
|
||||
sudo -u btcpay dotnet build -c Release BTCPayServer/BTCPayServer.csproj
|
||||
|
||||
echo "
|
||||
[Unit]
|
||||
Description=BtcPayServer daemon
|
||||
@@ -192,7 +201,7 @@ Restart=on-failure
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
" | sudo tee -a /etc/systemd/system/btcpayserver.service
|
||||
" | sudo tee /etc/systemd/system/btcpayserver.service
|
||||
|
||||
sudo systemctl daemon-reload
|
||||
sudo systemctl enable btcpayserver
|
||||
@@ -210,7 +219,7 @@ network=mainnet
|
||||
### Server settings ###
|
||||
port=23000
|
||||
bind=127.0.0.1
|
||||
externalurl=https://$YOUR_DOMAIN
|
||||
externalurl=https://$BTCPayDomain
|
||||
|
||||
### NBXplorer settings ###
|
||||
BTC.explorer.url=http://127.0.0.1:24444/
|
||||
@@ -244,6 +253,8 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
||||
sudo systemctl disable btcpayserver
|
||||
sudo rm /etc/systemd/system/btcpayserver.service
|
||||
|
||||
sudo -u btcpay dotnet nuget locals all --clear
|
||||
|
||||
sudo rm -f /home/btcpay/dotnet-sdk*
|
||||
sudo rm -f /home/btcpay/aspnetcore*
|
||||
sudo rm -rf /home/btcpay/dotnet
|
||||
|
@@ -56,6 +56,12 @@ if [ ${#ownDomain} -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if ! grep -Eq "^BTCPayDomain=" /mnt/hdd/raspiblitz.conf; then
|
||||
echo "BTCPayDomain=off" >> /mnt/hdd/raspiblitz.conf
|
||||
fi
|
||||
|
||||
|
||||
echo ""
|
||||
echo "***"
|
||||
echo "Setting up Nginx and Certbot"
|
||||
@@ -65,16 +71,16 @@ echo ""
|
||||
if [ $ownDomain -eq 1 ]; then
|
||||
echo ""
|
||||
echo "***"
|
||||
echo "Confirm that the port 80, 443 and 9735 are forwarded to the IP of your RaspiBlitz by pressing [ENTER] or use [CTRL + C] to exit"
|
||||
echo "Confirm that the ports 80, 443 and 9735 are forwarded to the IP of your RaspiBlitz by pressing [ENTER] or use [CTRL + C] to exit"
|
||||
read key
|
||||
|
||||
echo ""
|
||||
echo "***"
|
||||
echo "Type your domain/ddns pointing to your public IP and press [ENTER] or use [CTRL + C] to exit"
|
||||
echo "Type your domain or dynamicDNS pointing to your public IP and press [ENTER] or use [CTRL + C] to exit"
|
||||
echo "example:"
|
||||
echo "btcpay.example.com"
|
||||
read YOUR_DOMAIN
|
||||
|
||||
|
||||
echo ""
|
||||
echo "***"
|
||||
echo "Type an email address that will be used to message about the SSL certificate and press [ENTER] or use [CTRL + C] to exit"
|
||||
@@ -96,7 +102,7 @@ if [ $ownDomain -eq 1 ]; then
|
||||
|
||||
# get SSL cert
|
||||
sudo systemctl stop certbot 2>/dev/null
|
||||
sudo certbot certonly -a standalone -m $YOUR_EMAIL --agree-tos -d $YOUR_DOMAIN --pre-hook "service nginx stop" --post-hook "service nginx start"
|
||||
sudo certbot certonly -a standalone -m $YOUR_EMAIL --agree-tos -d $YOUR_DOMAIN -n --pre-hook "service nginx stop" --post-hook "service nginx start"
|
||||
|
||||
# set nginx
|
||||
sudo rm -f /etc/nginx/sites-enabled/default
|
||||
@@ -337,6 +343,9 @@ server {
|
||||
sudo systemctl restart nginx
|
||||
fi
|
||||
|
||||
# setting value in raspi blitz config
|
||||
sudo sed -i "s/^BTCPayDomain=.*/BTCPayDomain=$YOUR_DOMAIN/g" /mnt/hdd/raspiblitz.conf
|
||||
|
||||
if [ $ownDomain -eq 1 ]; then
|
||||
echo ""
|
||||
echo "Visit your BTCpayServer instance on https://$YOUR_DOMAIN"
|
||||
|
@@ -37,8 +37,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo sed -i "s/^lndmanage=.*/lndmanage=on/g" /mnt/hdd/raspiblitz.conf
|
||||
|
||||
echo "usage: https://github.com/bitromortac/lndmanage/blob/master/README.md"
|
||||
echo "to start type on command line: manage"
|
||||
echo "to exit then venv - type 'deactivate' and press ENTER"
|
||||
echo "To start type: 'manage' in the command line."
|
||||
echo "To exit the venv - type 'deactivate' and press ENTER"
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
@@ -16,8 +16,9 @@ fi
|
||||
|
||||
# check if nodeJS was installed
|
||||
nodeJSInstalled=$(node -v 2>/dev/null | grep -c "v1.")
|
||||
if [ ${nodeJSInstalled} -eq 0 ]; then
|
||||
|
||||
if ! [ ${nodeJSInstalled} -eq 0 ]; then
|
||||
echo "nodeJS is already installed"
|
||||
else
|
||||
# determine nodeJS VERSION and DISTRO
|
||||
echo "Detect CPU architecture ..."
|
||||
isARM=$(uname -m | grep -c 'arm')
|
||||
@@ -89,8 +90,6 @@ if [ ${nodeJSInstalled} -eq 0 ]; then
|
||||
echo "ABORT - nodeJs install"
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo "nodeJS is already installed"
|
||||
fi
|
||||
|
||||
# setting value in raspi blitz config
|
||||
|
@@ -16,7 +16,6 @@ if [ ${#network} -eq 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
source /mnt/hdd/raspiblitz.conf
|
||||
|
||||
# add default value to raspi config if needed
|
||||
if ! grep -Eq "^rtlWebinterface=" /mnt/hdd/raspiblitz.conf; then
|
||||
@@ -32,20 +31,31 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "*** INSTALL RTL ***"
|
||||
|
||||
isInstalled=$(sudo ls /etc/systemd/system/RTL.service 2>/dev/null | grep -c 'RTL.service')
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
if ! [ ${isInstalled} -eq 0 ]; then
|
||||
echo "RTL already installed."
|
||||
|
||||
else
|
||||
# check and install NodeJS
|
||||
/home/admin/config.scripts/bonus.nodejs.sh
|
||||
|
||||
# check for Python2 (install if missing)
|
||||
# TODO remove Python2 ASAP!
|
||||
echo "*** Check for Python2 ***"
|
||||
/usr/bin/which python2 &>/dev/null
|
||||
if ! [ $? -eq 0 ]; then
|
||||
echo "*** Install Python2 ***"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y python2
|
||||
fi
|
||||
|
||||
# download source code and set to tag release
|
||||
echo "*** Get the RTL Source Code ***"
|
||||
rm -r /home/admin/RTL 2>/dev/null
|
||||
git clone https://github.com/ShahanaFarooqui/RTL.git /home/admin/RTL
|
||||
cd /home/admin/RTL
|
||||
# git reset --hard v0.5.4
|
||||
git reset --hard v0.6.1
|
||||
# from https://github.com/Ride-The-Lightning/RTL/commits/master
|
||||
git checkout 917feebfa4fb583360c140e817c266649307ef72
|
||||
# check if node_modles exists now
|
||||
# git checkout 917feebfa4fb583360c140e817c266649307ef72
|
||||
if [ -d "/home/admin/RTL" ]; then
|
||||
echo "OK - RTL code copy looks good"
|
||||
else
|
||||
@@ -59,9 +69,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# install
|
||||
echo "*** Run: npm install ***"
|
||||
export NG_CLI_ANALYTICS=false
|
||||
npm install
|
||||
npm install --only=production
|
||||
cd ..
|
||||
# check if node_modles exists now
|
||||
# check if node_modules exist now
|
||||
if [ -d "/home/admin/RTL/node_modules" ]; then
|
||||
echo "OK - RTL install looks good"
|
||||
else
|
||||
@@ -71,6 +81,11 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
fi
|
||||
echo ""
|
||||
|
||||
# now remove Python2 again
|
||||
echo "*** Now remove Python2 again ***"
|
||||
sudo apt-get purge -y python2
|
||||
sudo apt-get autoremove -y
|
||||
|
||||
# prepare RTL.conf file
|
||||
echo "*** RTL.conf ***"
|
||||
cp ./RTL/sample-RTL.conf ./RTL/RTL.conf
|
||||
@@ -93,8 +108,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
sudo systemctl enable RTL
|
||||
echo "OK - the RTL service is now enabled"
|
||||
|
||||
else
|
||||
echo "RTL already installed."
|
||||
fi
|
||||
|
||||
# setting value in raspi blitz config
|
||||
|
Reference in New Issue
Block a user