From 5209508584c4751eae77548e96636cb77a8502dd Mon Sep 17 00:00:00 2001 From: openoms Date: Thu, 16 May 2024 23:10:47 +0200 Subject: [PATCH 01/16] correct rootPartition and rootPartitionBytes with volume group --- home.admin/config.scripts/blitz.bootdrive.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/home.admin/config.scripts/blitz.bootdrive.sh b/home.admin/config.scripts/blitz.bootdrive.sh index 95bcb71fe..79ff3c69f 100644 --- a/home.admin/config.scripts/blitz.bootdrive.sh +++ b/home.admin/config.scripts/blitz.bootdrive.sh @@ -27,10 +27,11 @@ action=$1 ######################### # STATUS -# gather data on sd card +# gather data on SDcard / OS drive minimumSizeByte=16384000000 -rootPartition=$(sudo mount | grep " / " | cut -d " " -f 1 | cut -d "/" -f 3) -rootPartitionBytes=$(lsblk -b -o NAME,SIZE | grep "${rootPartition}" | tr -s ' ' | cut -d " " -f 2) +rootPartitionLine=$(sudo mount | grep " / " | cut -d " " -f 1) +rootPartition=$(basename ${rootPartitionLine}) +rootPartitionBytes=$(lsblk -b -o NAME,SIZE | grep "${rootPartition}" | awk '{print $2}') # make conclusions needsExpansion=0 From e63326bbea61cf5969481342e7834cba1322ee6a Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Thu, 16 May 2024 23:13:50 +0200 Subject: [PATCH 02/16] fix FulcrumAdmin symlink (#4574) --- home.admin/config.scripts/bonus.fulcrum.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home.admin/config.scripts/bonus.fulcrum.sh b/home.admin/config.scripts/bonus.fulcrum.sh index 9939fcfbc..cf8a9f672 100644 --- a/home.admin/config.scripts/bonus.fulcrum.sh +++ b/home.admin/config.scripts/bonus.fulcrum.sh @@ -315,8 +315,8 @@ function downloadAndVerifyBinary() { sudo rm -f /home/fulcrum/Fulcrum sudo rm -f /home/fulcrum/FulcrumAdmin # symlink - sudo ln -s /home/fulcrum/Fulcrum-${fulcrumVersion}-${build}/Fulcrum /home/fulcrum/ | - sudo ln -s /home/fulcrum/Fulcrum-${fulcrumVersion}-${build}/FulcrumAdmin /home/fulcrum/ + sudo ln -s /home/fulcrum/Fulcrum-${fulcrumVersion}-${build}/Fulcrum /home/fulcrum/ + sudo ln -s /home/fulcrum/Fulcrum-${fulcrumVersion}-${build}/FulcrumAdmin /home/fulcrum/ } function createSystemdService() { From bf9dbc0321676426e1bc25b6d54c5856578f10ea Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Fri, 17 May 2024 09:55:01 +0200 Subject: [PATCH 03/16] add GPT integrity check for amd64 (#4576) --- home.admin/_bootstrap.sh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index f848d471e..eecea58ad 100755 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -337,6 +337,34 @@ else echo "No HDMI switch found. " >> $logFile fi +################################ +# GPT integrity check +################################ + +check_and_fix_gpt() { + local device=$1 + output=$(sudo gdisk -l $device 2>&1) + if echo "$output" | grep -q "PMBR size mismatch"; then + echo "GPT PMBR size mismatch detected on $device. Fixing..." >> $logFile + sgdisk -e $device + echo "Fixed GPT PMBR size mismatch on $device." >> $logFile + elif echo "$output" | grep -q "The backup GPT table is not on the end of the device"; then + echo "Backup GPT table is not at the end of $device. Fixing..." >> $logFile + sgdisk -e $device + echo "Fixed backup GPT table location on $device." >> $logFile + else + echo "No GPT issues detected on $device." >> $logFile + fi +} + +# List all block devices +devices=$(lsblk -dno NAME | grep -E '^sd|^nvme|^vd|^mmcblk') + +# Check and fix each device +for dev in $devices; do + check_and_fix_gpt /dev/$dev +done + ################################ # FS EXPAND # extend sd card to maximum capacity From b419daf43a22c98879ffc2a7f2937bde14b81e0f Mon Sep 17 00:00:00 2001 From: rootzoll Date: Fri, 24 May 2024 17:41:44 +0200 Subject: [PATCH 04/16] fix #4571 typo --- home.admin/_commands.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 1741c20fe..4cdedf581 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -81,7 +81,7 @@ function blitzhelp() { echo " whitepaper download the whitepaper from the blockchain to /home/admin/bitcoin.pdf" echo " notifyme wrapper for blitz.notify.sh that will send a notification using the configured method and settings" echo " suez visualize channels (for the default ln implementation and chain when installed)" - exho " lnproxy wrap invoices with lnproxy" + echo " lnproxy wrap invoices with lnproxy" echo echo "LND:" echo " lncli LND commandline interface (when installed)" From 8c8b0b2c62f27b4927fb851cbd83ac1a66c4f451 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Fri, 24 May 2024 22:45:48 +0200 Subject: [PATCH 05/16] #4553 update to firmware to 1708097321 --- home.admin/_bootstrap.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index eecea58ad..4c3a48374 100755 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -548,13 +548,15 @@ if [ "${baseimage}" == "raspios_arm64" ]; then isRaspberryPi5=$(cat /proc/device-tree/model 2>/dev/null | grep -c "Raspberry Pi 5") firmwareBuildNumber=$(rpi-eeprom-update | grep "CURRENT" | cut -d "(" -f2 | sed 's/[^0-9]*//g') echo "checking Firmware: isRaspberryPi5(${isRaspberryPi5}) firmwareBuildNumber(${firmwareBuildNumber})" >> $logFile - if [ ${isRaspberryPi5} -gt 0 ] && [ ${firmwareBuildNumber} -lt 1701887365 ]; then - echo "RaspberryPi 5 detected with old firmware ... do update." >> $logFile + if [ ${isRaspberryPi5} -gt 0 ] && [ ${firmwareBuildNumber} -lt 1708097321 ]; then + echo "updating Firmware" >> $logFile + echo "RaspberryPi 5 detected with old firmware (${firmwareBuildNumber}) ... do update." >> $logFile apt-get update -y apt-get upgrade -y apt-get install -y rpi-eeprom rpi-eeprom-update -a echo "Restarting ..." >> $logFile + sleep 3 reboot else echo "RaspberryPi Firmware not in th need of update." >> $logFile From e174972fe2d954cbac7f1589242e52b323271c6a Mon Sep 17 00:00:00 2001 From: rootzoll Date: Fri, 24 May 2024 23:17:10 +0200 Subject: [PATCH 06/16] add date as comment --- home.admin/_bootstrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/home.admin/_bootstrap.sh b/home.admin/_bootstrap.sh index 4c3a48374..e2a1eb35f 100755 --- a/home.admin/_bootstrap.sh +++ b/home.admin/_bootstrap.sh @@ -548,7 +548,7 @@ if [ "${baseimage}" == "raspios_arm64" ]; then isRaspberryPi5=$(cat /proc/device-tree/model 2>/dev/null | grep -c "Raspberry Pi 5") firmwareBuildNumber=$(rpi-eeprom-update | grep "CURRENT" | cut -d "(" -f2 | sed 's/[^0-9]*//g') echo "checking Firmware: isRaspberryPi5(${isRaspberryPi5}) firmwareBuildNumber(${firmwareBuildNumber})" >> $logFile - if [ ${isRaspberryPi5} -gt 0 ] && [ ${firmwareBuildNumber} -lt 1708097321 ]; then + if [ ${isRaspberryPi5} -gt 0 ] && [ ${firmwareBuildNumber} -lt 1708097321 ]; then # Fri 16 Feb 15:28:41 UTC 2024 (1708097321) echo "updating Firmware" >> $logFile echo "RaspberryPi 5 detected with old firmware (${firmwareBuildNumber}) ... do update." >> $logFile apt-get update -y From d423c3c2d9641dda5301f8d885c0ae1d93fd0474 Mon Sep 17 00:00:00 2001 From: rootzoll Date: Sat, 25 May 2024 14:40:07 +0200 Subject: [PATCH 07/16] add resolvconf for v1.12.0 base image --- build_sdcard.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build_sdcard.sh b/build_sdcard.sh index 40fc911c0..f80b6df7e 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -369,7 +369,7 @@ echo -e "\n*** SOFTWARE UPDATE ***" # sqlite3 -> database # fdisk -> create partitions # lsb-release -> needed to know which distro version we're running to add APT sources -general_utils="policykit-1 htop git curl bash-completion vim jq dphys-swapfile bsdmainutils autossh telnet vnstat parted dosfstools fbi sysbench build-essential dialog bc python3-dialog unzip whois fdisk lsb-release smartmontools rsyslog" +general_utils="policykit-1 htop git curl bash-completion vim jq dphys-swapfile bsdmainutils autossh telnet vnstat parted dosfstools fbi sysbench build-essential dialog bc python3-dialog unzip whois fdisk lsb-release smartmontools rsyslog resolvconf" # add btrfs-progs if not bookworm on aarch64 [ "${architecture}" = "aarch64" ] && ! grep "12 (bookworm)" < /etc/os-release && general_utils="${general_utils} btrfs-progs" # python3-mako --> https://github.com/rootzoll/raspiblitz/issues/3441 From bd5f0104096398a2c33910d4b419b97367ad6ec7 Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Tue, 28 May 2024 21:53:04 +0200 Subject: [PATCH 08/16] #4561 Remove Tallycoin App (#4562) * #4561 remove tallycoin app --- CHANGES.md | 4 + home.admin/00mainMenu.sh | 6 - home.admin/00settingsMenuServices.sh | 19 -- home.admin/_provision_.sh | 9 - .../tallycoin_connect_ssl.conf | 21 -- .../tallycoin_connect_tor.conf | 18 -- .../tallycoin_connect_tor_ssl.conf | 21 -- .../config.scripts/bonus.tallycoin-connect.sh | 225 ------------------ 8 files changed, 4 insertions(+), 319 deletions(-) delete mode 100644 home.admin/assets/nginx/sites-available/tallycoin_connect_ssl.conf delete mode 100644 home.admin/assets/nginx/sites-available/tallycoin_connect_tor.conf delete mode 100644 home.admin/assets/nginx/sites-available/tallycoin_connect_tor_ssl.conf delete mode 100755 home.admin/config.scripts/bonus.tallycoin-connect.sh diff --git a/CHANGES.md b/CHANGES.md index bf6102e89..3f74304a8 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +## What's new in Version 1.11.1 of RaspiBlitz? + +- Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082) + ## What's new in Version 1.11.0 of RaspiBlitz? - New: RaspberryPi5 tested & enabling NVMe PCIe Hats diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index 01df9072d..047a2ac9f 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -159,9 +159,6 @@ fi if [ "${circuitbreaker}" == "on" ]; then OPTIONS+=(CIRCUITBREAKER "Circuitbreaker (LND firewall)") fi -if [ "${tallycoinConnect}" == "on" ]; then - OPTIONS+=(TALLY "Tallycoin Connect") -fi if [ "${squeaknode}" == "on" ]; then OPTIONS+=(SQUEAKNODE "Squeaknode") fi @@ -310,9 +307,6 @@ case $CHOICE in THUB) sudo /home/admin/config.scripts/bonus.thunderhub.sh menu ;; - TALLY) - sudo /home/admin/config.scripts/bonus.tallycoin-connect.sh menu - ;; ZEROTIER) sudo /home/admin/config.scripts/bonus.zerotier.sh menu ;; diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index 1b379417e..c4122d3ba 100755 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -26,7 +26,6 @@ if [ ${#lit} -eq 0 ]; then lit="off"; fi if [ ${#lndg} -eq 0 ]; then lndg="off"; fi if [ ${#whitepaper} -eq 0 ]; then whitepaper="off"; fi if [ ${#chantools} -eq 0 ]; then chantools="off"; fi -if [ ${#tallycoinConnect} -eq 0 ]; then tallycoinConnect="off"; fi if [ ${#helipad} -eq 0 ]; then helipad="off"; fi if [ ${#lightningtipbot} -eq 0 ]; then lightningtipbot="off"; fi if [ ${#fints} -eq 0 ]; then fints="off"; fi @@ -66,7 +65,6 @@ if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then OPTIONS+=(ha 'LND ChannelTools (Fund Rescue)' ${chantools}) OPTIONS+=(xa 'LND Sphinx-Relay' ${sphinxrelay}) OPTIONS+=(fa 'LND Helipad Boostagram reader' ${helipad}) - OPTIONS+=(da 'LND Tallycoin Connect' ${tallycoinConnect}) OPTIONS+=(lb 'LND LNDK (experimental BOLT 12)' ${lndk}) fi @@ -485,23 +483,6 @@ else echo "Helipad setting unchanged." fi -# Tallycoin -choice="off"; check=$(echo "${CHOICES}" | grep -c "da") -if [ ${check} -eq 1 ]; then choice="on"; fi -if [ "${tallycoinConnect}" != "${choice}" ]; then - echo "Tallycoin Setting changed .." - anychange=1 - sudo -u admin /home/admin/config.scripts/bonus.tallycoin-connect.sh ${choice} - if [ "${choice}" = "on" ]; then - whiptail --title " Installed Tallycoin-Connect" --msgbox "\ -Tallycoin-Connect was installed.\n -Use the new 'TALLY' entry in Main Menu for more info.\n -" 10 45 - fi -else - echo "Tallycoin Setting unchanged." -fi - # LNDK choice="off"; check=$(echo "${CHOICES}" | grep -c "lb") if [ ${check} -eq 1 ]; then choice="on"; fi diff --git a/home.admin/_provision_.sh b/home.admin/_provision_.sh index 71b2d20cc..bc6696a26 100755 --- a/home.admin/_provision_.sh +++ b/home.admin/_provision_.sh @@ -721,15 +721,6 @@ else echo "Provisioning CircuitBreaker - keep default" >> ${logFile} fi -# tallycoin_connect -if [ "${tallycoinConnect}" = "on" ]; then - echo "Provisioning Tallycoin Connect - run config script" >> ${logFile} - /home/admin/_cache.sh set message "Setup Tallycoin Connect" - sudo -u admin /home/admin/config.scripts/bonus.tallycoin-connect.sh on >> ${logFile} 2>&1 -else - echo "Provisioning Tallycoin Connect - keep default" >> ${logFile} -fi - # squeaknode if [ "${squeaknode}" = "on" ]; then echo "Provisioning Squeaknode - run config script" >> ${logFile} diff --git a/home.admin/assets/nginx/sites-available/tallycoin_connect_ssl.conf b/home.admin/assets/nginx/sites-available/tallycoin_connect_ssl.conf deleted file mode 100644 index 01a31ee89..000000000 --- a/home.admin/assets/nginx/sites-available/tallycoin_connect_ssl.conf +++ /dev/null @@ -1,21 +0,0 @@ -## tallycoin_connect_ssl.conf - -server { - listen 8124 ssl http2; - listen [::]:8124 ssl http2; - server_name _; - - include /etc/nginx/snippets/ssl-params.conf; - include /etc/nginx/snippets/ssl-certificate-app-data.conf; - - include /etc/nginx/snippets/gzip-params.conf; - - access_log /var/log/nginx/access_tallycoin_connect.log; - error_log /var/log/nginx/error_tallycoin_connect.log; - - location / { - proxy_pass http://127.0.0.1:8123; - - include /etc/nginx/snippets/ssl-proxy-params.conf; - } -} diff --git a/home.admin/assets/nginx/sites-available/tallycoin_connect_tor.conf b/home.admin/assets/nginx/sites-available/tallycoin_connect_tor.conf deleted file mode 100644 index 20abe0e59..000000000 --- a/home.admin/assets/nginx/sites-available/tallycoin_connect_tor.conf +++ /dev/null @@ -1,18 +0,0 @@ -## tallycoin_connect_tor.conf - -server { - listen 8125; - listen [::]:8125; - server_name _; - - include /etc/nginx/snippets/gzip-params.conf; - - access_log /var/log/nginx/access_tallycoin_connect.log; - error_log /var/log/nginx/error_tallycoin_connect.log; - - location / { - proxy_pass http://127.0.0.1:8123; - - include /etc/nginx/snippets/ssl-proxy-params.conf; - } -} diff --git a/home.admin/assets/nginx/sites-available/tallycoin_connect_tor_ssl.conf b/home.admin/assets/nginx/sites-available/tallycoin_connect_tor_ssl.conf deleted file mode 100644 index 309d2d033..000000000 --- a/home.admin/assets/nginx/sites-available/tallycoin_connect_tor_ssl.conf +++ /dev/null @@ -1,21 +0,0 @@ -## tallycoin_connect_tor_ssl.conf - -server { - listen 8126 ssl http2; - listen [::]:8126 ssl http2; - server_name _; - - include /etc/nginx/snippets/ssl-params.conf; - include /etc/nginx/snippets/ssl-certificate-app-data-tor.conf; - - include /etc/nginx/snippets/gzip-params.conf; - - access_log /var/log/nginx/access_tallycoin_connect.log; - error_log /var/log/nginx/error_tallycoin_connect.log; - - location / { - proxy_pass http://127.0.0.1:8123; - - include /etc/nginx/snippets/ssl-proxy-params.conf; - } -} diff --git a/home.admin/config.scripts/bonus.tallycoin-connect.sh b/home.admin/config.scripts/bonus.tallycoin-connect.sh deleted file mode 100755 index bc48aa296..000000000 --- a/home.admin/config.scripts/bonus.tallycoin-connect.sh +++ /dev/null @@ -1,225 +0,0 @@ -#!/bin/bash - -# https://github.com/djbooth007/tallycoin_connect - -USERNAME=tallycoin -APP_DATA_DIR=/mnt/hdd/app-data/tallycoin-connect -HOME_DIR=/home/$USERNAME -CONFIG_FILE=$APP_DATA_DIR/tallycoin_api.key -RASPIBLITZ_INFO=/home/admin/raspiblitz.info -SERVICE_FILE=/etc/systemd/system/tallycoin-connect.service -TC_VERSION=1.8.0 - -# command info -if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then - echo "config script to switch tallycoin_connect on or off" - echo "bonus.tallycoin-connect.sh [on|off|menu]" - exit 1 -fi - -# check and load raspiblitz config to know which network is running -source $RASPIBLITZ_INFO -source /mnt/hdd/raspiblitz.conf - -# show info menu -if [ "$1" = "menu" ]; then - # get network info - localip=$(hostname -I | awk '{print $1}') - toraddress=$(sudo cat /mnt/hdd/tor/tallycoin-connect/hostname 2>/dev/null) - fingerprint=$(openssl x509 -in /mnt/hdd/app-data/nginx/tls.cert -fingerprint -noout | cut -d"=" -f2) - - if [ "${runBehindTor}" = "on" ] && [ ${#toraddress} -gt 0 ]; then - # Info with TOR - sudo /home/admin/config.scripts/blitz.display.sh qr "${toraddress}" - whiptail --title " Tallycoin Connect " --msgbox "Open in your local web browser: -http://${localip}:8123\n -https://${localip}:8124 with Fingerprint: -${fingerprint}\n -Use your Password B to login.\n -Hidden Service address for TOR Browser (see LCD for QR):\n${toraddress} -" 16 72 - sudo /home/admin/config.scripts/blitz.display.sh hide - else - # Info without TOR - whiptail --title " Tallycoin Connect " --msgbox "Open in your local web browser & accept self-signed cert: -http://${localip}:8123\n -https://${localip}:8124 with Fingerprint: -${fingerprint}\n -Use your Password B to login.\n -Activate TOR to access the web interface from outside your local network. -" 15 72 - fi - echo "please wait ..." - exit 0 -fi - -# switch on -if [ "$1" = "1" ] || [ "$1" = "on" ]; then - isInstalled=$(sudo ls $HOME_DIR 2>/dev/null | grep -c 'tallycoin_connect') - if [ ${isInstalled} -eq 0 ]; then - echo "*** INSTALL TALLYCOIN CONNECT ***" - - # install nodeJS - /home/admin/config.scripts/bonus.nodejs.sh on - - # add user - sudo adduser --system --group --home /home/$USERNAME $USERNAME - - # install tallycoin_connect - cd $HOME_DIR - sudo -u $USERNAME wget https://github.com/djbooth007/tallycoin_connect/archive/refs/tags/v$TC_VERSION.tar.gz - sudo -u $USERNAME tar -xzf v$TC_VERSION.tar.gz - sudo -u $USERNAME mv tallycoin_connect{-$TC_VERSION,} - sudo -u $USERNAME rm v$TC_VERSION.tar.gz - cd tallycoin_connect - sudo -u $USERNAME cat .dockerignore | sudo -u $USERNAME xargs sudo -u $USERNAME rm -rf - sudo -u $USERNAME rm .dockerignore - sudo -u $USERNAME npm install - if ! [ $? -eq 0 ]; then - echo "FAIL - npm install did not run correctly, aborting" - exit 1 - fi - - # setup config - sudo mkdir -p $APP_DATA_DIR - sudo chown $USERNAME:$USERNAME $APP_DATA_DIR - - if [[ ! -f "$CONFIG_FILE" ]]; then - configFile=/home/admin/tallycoin_api.key - touch $configFile - sudo chmod 600 $configFile || exit 1 - passwordB=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-) - passwd=$(printf $passwordB | sha256sum | tr -d ' -') - tlsCert=$(base64 /mnt/hdd/app-data/lnd/tls.cert | tr -d '=' | tr '/+' '_-' | tr -d '\n') - macaroon=$(base64 /mnt/hdd/app-data/lnd/data/chain/${network}/${chain}net/admin.macaroon | tr -d '=' | tr '/+' '_-' | tr -d '\n') - echo "{\"tls_cert\":\"$tlsCert\",\"macaroon\":\"$macaroon\",\"tallycoin_passwd\":\"$passwd\"}" > $configFile - - sudo mv $configFile $CONFIG_FILE - sudo chown $USERNAME:$USERNAME $CONFIG_FILE - fi - - ################## - # NGINX - ################## - # setup nginx symlinks - if ! [ -f /etc/nginx/sites-available/tallycoin_connect_ssl.conf ]; then - sudo cp -f /home/admin/assets/nginx/sites-available/tallycoin_connect_ssl.conf /etc/nginx/sites-available/tallycoin_connect_ssl.conf - fi - if ! [ -f /etc/nginx/sites-available/tallycoin_connect_tor.conf ]; then - sudo cp /home/admin/assets/nginx/sites-available/tallycoin_connect_tor.conf /etc/nginx/sites-available/tallycoin_connect_tor.conf - fi - if ! [ -f /etc/nginx/sites-available/tallycoin_connect_tor_ssl.conf ]; then - sudo cp /home/admin/assets/nginx/sites-available/tallycoin_connect_tor_ssl.conf /etc/nginx/sites-available/tallycoin_connect_tor_ssl.conf - fi - sudo ln -sf /etc/nginx/sites-available/tallycoin_connect_ssl.conf /etc/nginx/sites-enabled/ - sudo ln -sf /etc/nginx/sites-available/tallycoin_connect_tor.conf /etc/nginx/sites-enabled/ - sudo ln -sf /etc/nginx/sites-available/tallycoin_connect_tor_ssl.conf /etc/nginx/sites-enabled/ - sudo nginx -t - sudo systemctl reload nginx - - # open the firewall - echo "*** Updating Firewall ***" - sudo ufw allow from any to any port 8123 comment 'allow Tallycoin Connect HTTP' - sudo ufw allow from any to any port 8124 comment 'allow Tallycoin Connect HTTPS' - echo "" - - ################## - # SYSTEMD SERVICE - ################## - - echo "# Install Tallycoin Connect systemd for ${network} on ${chain}" - echo " -# Systemd unit for Tallycoin Connect - -[Unit] -Description=Tallycoin Connect daemon -Wants=lnd.service -After=lnd.service - -[Service] -WorkingDirectory=$HOME_DIR/tallycoin_connect -Environment=\"CONFIG_FILE=$CONFIG_FILE\" -ExecStart=/usr/bin/npm start -User=tallycoin -Restart=always -TimeoutSec=120 -RestartSec=30 -StandardOutput=null -StandardError=journal - -# Hardening measures -PrivateTmp=true -ProtectSystem=full -NoNewPrivileges=true -PrivateDevices=true - -[Install] -WantedBy=multi-user.target -" | sudo tee $SERVICE_FILE - sudo systemctl enable tallycoin-connect - - # setting value in raspiblitz config - /home/admin/config.scripts/blitz.conf.sh set tallycoinConnect "on" - - # Hidden Service for tallycoin-connect if Tor is active - if [ "${runBehindTor}" = "on" ]; then - # make sure to keep in sync with tor.onion-service.sh script - /home/admin/config.scripts/tor.onion-service.sh tallycoin-connect 80 8125 443 8126 - fi - source $RASPIBLITZ_INFO - if [ "${state}" == "ready" ]; then - echo "# OK - the tallycoin-connect.service is enabled, system is ready so starting service" - sudo systemctl start tallycoin-connect - else - echo "# OK - the tallycoin-connect.service is enabled, to start manually use: 'sudo systemctl start tallycoin-connect'" - fi - else - echo "*** TALLYCOIN CONNECT ALREADY INSTALLED ***" - fi - exit 0 -fi - -# switch off -if [ "$1" = "0" ] || [ "$1" = "off" ]; then - isInstalled=$(sudo ls $HOME_DIR 2>/dev/null | grep -c 'tallycoin_connect') - if [ ${isInstalled} -eq 1 ]; then - echo "*** UNINSTALL TALLYCOIN CONNECT ***" - - # remove systemd service - sudo systemctl stop tallycoin-connect - sudo systemctl disable tallycoin-connect - sudo rm -f $SERVICE_FILE - - # close ports on firewall - sudo ufw delete allow from any to any port 8123 comment 'allow Tallycoin Connect HTTP' - sudo ufw delete allow from any to any port 8124 comment 'allow Tallycoin Connect HTTPS' - - # remove nginx symlinks - sudo rm -f /etc/nginx/sites-enabled/tallycoin_connect_* - sudo nginx -t - sudo systemctl reload nginx - - # Hidden Service if Tor is active - if [ "${runBehindTor}" = "on" ]; then - /home/admin/config.scripts/tor.onion-service.sh off tallycoin-connect - fi - - # remove config - sudo rm -rf $APP_DATA_DIR - - # delete user and home directory - sudo userdel -rf $USERNAME - - # setting value in raspi blitz config - /home/admin/config.scripts/blitz.conf.sh set tallycoinConnect "off" - - echo "OK TALLYCOIN CONNECT removed." - else - echo "*** TALLYCOIN CONNECT NOT INSTALLED ***" - fi - - exit 0 -fi - -echo "FAIL - Unknown Parameter $1" -exit 1 From 3de15bed4901ec6be1dc206d0ca3fa7dd068853f Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Tue, 28 May 2024 21:56:45 +0200 Subject: [PATCH 09/16] specter update to 2.0.4 (#3709) * specter update to 2.0.0 with python 3.10 * add deadsnake GPG key without using apt-key * fix deleteData question * fix config and formatting * specter update to v2.0.1, remove default node * readd config and del user on uninstall * update config * fix merge * readd UPDATE option in menu * specter update to v2.0.2, fix config * specter update to 2.0.4 * add to change --- CHANGES.md | 3 ++- home.admin/99updateMenu.sh | 6 +++--- home.admin/config.scripts/bonus.specter.sh | 12 +++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 3f74304a8..6209f946c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ ## What's new in Version 1.11.1 of RaspiBlitz? +- Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4) - Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082) ## What's new in Version 1.11.0 of RaspiBlitz? @@ -83,7 +84,7 @@ - Update: Core Lightning v23.02.2 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.02.2) - Update: C-lightningREST v0.10.2 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.2) - Update: Electrum Server in Rust (electrs) v0.9.11 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0911-jan-5-2023) -- Update: Lightning Terminal v0.9.2-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.9.2-alpha) +- Update: Lightning Terminal v0.8.6-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.8.6-alpha) - Update: RTL v0.13.6 with update option [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.13.6) - Update: Thunderhub v0.13.16 with balance sharing disabled [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.16) - Update: LNbits 0.10.6 [details](https://github.com/lnbits/lnbits/releases/tag/0.10.6) diff --git a/home.admin/99updateMenu.sh b/home.admin/99updateMenu.sh index ea75360c1..149159954 100755 --- a/home.admin/99updateMenu.sh +++ b/home.admin/99updateMenu.sh @@ -490,9 +490,9 @@ if [ "${lndg}" == "on" ]; then fi ## Disabled for now until the base image has Python 3.10 -#if [ "${specter}" == "on" ]; then -# OPTIONS+=(SPECTER "Update Specter Desktop") -#fi +if [ "${specter}" == "on" ]; then + OPTIONS+=(SPECTER "Update Specter Desktop") +fi if [ "${BTCPayServer}" == "on" ]; then OPTIONS+=(BTCPAY "Update BTCPayServer") diff --git a/home.admin/config.scripts/bonus.specter.sh b/home.admin/config.scripts/bonus.specter.sh index b84bcd836..a781ff592 100755 --- a/home.admin/config.scripts/bonus.specter.sh +++ b/home.admin/config.scripts/bonus.specter.sh @@ -1,7 +1,7 @@ #!/bin/bash # https://github.com/cryptoadvance/specter-desktop -pinnedVersion="1.13.1" +pinnedVersion="2.0.4" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then @@ -131,7 +131,7 @@ function configure_specter { "proxy_url": "${proxy}", "only_tor": "${torOnly}", "tor_control_port": "${tor_control_port}", - "tor_status": true, + "tor_status": false, "hwi_bridge_url": "/hwi/api/" } EOF @@ -146,6 +146,8 @@ EOF echo "# Connect Specter to the default mainnet node" cat >/home/admin/default.json < creating a virtualenv" sudo -u specter virtualenv --python=python3 /home/specter/.env + sudo -u specter /home/specter/.env/bin/python3 -m pip install --upgrade pip + echo "# --> pip-installing specter" sudo -u specter /home/specter/.env/bin/python3 -m pip install --upgrade cryptoadvance.specter==$pinnedVersion || exit 1 From 4f7ce2b8a724cb9fba709849d5dc467c14d331a2 Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Tue, 28 May 2024 22:25:37 +0200 Subject: [PATCH 10/16] #4589 Remove IP2Tor shoplist (#4595) * remove shop list * add CHANGES --- CHANGES.md | 1 + .../blitz.subscriptions.ip2tor.py | 46 ++++++++++++------- 2 files changed, 30 insertions(+), 17 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 6209f946c..d0ad0a884 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ - Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4) - Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082) +- Remove: IP2Tor Shoplist [details](https://github.com/raspiblitz/raspiblitz/issues/4589) ## What's new in Version 1.11.0 of RaspiBlitz? diff --git a/home.admin/config.scripts/blitz.subscriptions.ip2tor.py b/home.admin/config.scripts/blitz.subscriptions.ip2tor.py index fb9ae2fa9..e2b0401f5 100755 --- a/home.admin/config.scripts/blitz.subscriptions.ip2tor.py +++ b/home.admin/config.scripts/blitz.subscriptions.ip2tor.py @@ -632,30 +632,42 @@ def menuMakeSubscription(blitzServiceName, torAddress, torPort): # enter own shop address option choices.append(("X", "Enter a new Shop URL")) - # select dialog + # show a dialog info box d = Dialog(dialog="dialog", autowidgetsize=True) d.set_background_title("IP2TOR - Select Shop") - code, selected = d.menu( - "\nChoose your IP2Tor provider/shop:", - choices=choices, width=75, height=10, title="Select IP2Tor Shop") + d.msgbox(''' +At the moment there are no public IP2TOR services to link to. +You could run one yourself - please check the GitHub repo: +https://github.com/raulcano/docker-ip2tor-shop''', height=10, width=72) + + # select dialog + #d = Dialog(dialog="dialog", autowidgetsize=True) + #d.set_background_title("IP2TOR - Select Shop") + #code, selected = d.menu( + # "\nChoose your IP2Tor provider/shop:", + # choices=choices, width=75, height=10, title="Select IP2Tor Shop") # if user canceled - if code != d.OK: - sys.exit(0) + #if code != d.OK: + # sys.exit(0) - if selected == "A" : shopurl=choice_url_ip2torcom - if selected == "B" : shopurl=choice_url_fulmo - if selected == "Y" : shopurl=lastusedShop + #if selected == "A" : shopurl=choice_url_ip2torcom + #if selected == "B" : shopurl=choice_url_fulmo + #if selected == "Y" : shopurl=lastusedShop # input shop url - if selected == "X": - d = Dialog(dialog="dialog", autowidgetsize=True) - d.set_background_title("IP2TOR - Add new Shop") - code, shopurl = d.inputbox( - "Enter Address of the IP2TOR Shop (OR JUST PRESS OK):", - height=10, width=72, init=shopurl, - title="Shop Address") - if shopurl.find("://") > 0: shopurl = shopurl[shopurl.find("://") + 3:] + #if selected == "X": + d = Dialog(dialog="dialog", autowidgetsize=True) + d.set_background_title("IP2TOR - Add new Shop") + code, shopurl = d.inputbox( + "Enter Address of the IP2TOR Shop (OR JUST PRESS OK):", + height=10, width=72, init=shopurl, + title="Shop Address") + if shopurl.find("://") > 0: shopurl = shopurl[shopurl.find("://") + 3:] + + # if user choose cancel + if code != d.OK: + sys.exit(0) # try & get host list from shop os.system('clear') From 45dbdb3b82c23228432f089107b39907a4f0641d Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Tue, 28 May 2024 22:42:11 +0200 Subject: [PATCH 11/16] Add script for signing messages from specific address (#4582) * Add script for signing messages from specific address * use bitcoin-cli to check address * add CHANGES --- CHANGES.md | 1 + home.admin/config.scripts/lnd.signaddress.sh | 50 ++++++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 home.admin/config.scripts/lnd.signaddress.sh diff --git a/CHANGES.md b/CHANGES.md index d0ad0a884..77b4313cf 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,6 @@ ## What's new in Version 1.11.1 of RaspiBlitz? +- New: config.scripts/lnd.signaddress.sh to easy sign messages on addresses on LND [details](https://github.com/raspiblitz/raspiblitz/issues/4540) - Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4) - Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082) - Remove: IP2Tor Shoplist [details](https://github.com/raspiblitz/raspiblitz/issues/4589) diff --git a/home.admin/config.scripts/lnd.signaddress.sh b/home.admin/config.scripts/lnd.signaddress.sh new file mode 100644 index 000000000..0c27682df --- /dev/null +++ b/home.admin/config.scripts/lnd.signaddress.sh @@ -0,0 +1,50 @@ +#!/bin/bash + +# This script allows users to sign a message from a specific Bitcoin address +# either by generating a new address or using an existing one. + +# Ask if a new address should be generated or an existing one should be entered +read -p "Do you want to generate a new address? (y/n) " generate_new + +# 1.a. If generating a new address, ask for the address type +if [ "$generate_new" == "y" ]; then + echo "Generate a wallet new address. Address-types has to be one of:" + echo "1. p2wkh: Pay to witness key hash" + echo "2. np2wkh: Pay to nested witness key hash" + echo "3. p2tr: Pay to taproot pubkey" + read -p "Enter the address type (1-3 or string): " address_type + case "$address_type" in + 1|"p2wkh") + address_type="p2wkh" + ;; + 2|"np2wkh") + address_type="np2wkh" + ;; + 3|"p2tr") + address_type="p2tr" + ;; + *) + echo "Error: Invalid address type." + exit 1 + ;; + esac + address=$(lncli newaddress $address_type) + address_variable=$(echo $address | jq -r '.address') +else + # 1.b. Check if the manually entered address is valid + read -p "Enter the existing address: " address + if ! bitcoin-cli validateaddress "$address" | grep -q "isvalid\": true"; then + echo "Error: The entered address is not valid." + exit 1 + fi + address_variable=$address +fi +# 2. Ask for the message to sign and save it to a variable +read -p "Enter the message to sign: " message_to_sign + +# 3. Execute the lncli wallet addresses signmessage command +signature_js=$(lncli wallet addresses signmessage --address $address_variable --msg "$message_to_sign") +signature=$(echo $signature_js | jq -r '.signature') +echo "The address is: $address_variable" +echo "The message to sign is: $message_to_sign" +echo "The signature is: $signature" From 4932495daab7868dcaeb3265100a057ae5c4f21a Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Wed, 29 May 2024 00:11:31 +0200 Subject: [PATCH 12/16] LNbits update to v0.12.4 (#4491) * lnbits install script formatting * lnbits update to 0.12.4 --- .../nginx/sites-available/lnbits_ssl.conf | 5 + .../nginx/sites-available/lnbits_tor_ssl.conf | 5 + home.admin/config.scripts/bonus.lnbits.sh | 306 +++++++++--------- 3 files changed, 164 insertions(+), 152 deletions(-) diff --git a/home.admin/assets/nginx/sites-available/lnbits_ssl.conf b/home.admin/assets/nginx/sites-available/lnbits_ssl.conf index d8f3858d4..2ab8c93f4 100644 --- a/home.admin/assets/nginx/sites-available/lnbits_ssl.conf +++ b/home.admin/assets/nginx/sites-available/lnbits_ssl.conf @@ -19,6 +19,11 @@ server { location / { proxy_pass http://127.0.0.1:5000; + + # needed for websocket connections + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; include /etc/nginx/snippets/ssl-proxy-params.conf; } diff --git a/home.admin/assets/nginx/sites-available/lnbits_tor_ssl.conf b/home.admin/assets/nginx/sites-available/lnbits_tor_ssl.conf index e68d32e62..9b2df1433 100644 --- a/home.admin/assets/nginx/sites-available/lnbits_tor_ssl.conf +++ b/home.admin/assets/nginx/sites-available/lnbits_tor_ssl.conf @@ -19,6 +19,11 @@ server { location / { proxy_pass https://127.0.0.1:5001; + # needed for websocket connections + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "upgrade"; + include /etc/nginx/snippets/ssl-proxy-params.conf; } diff --git a/home.admin/config.scripts/bonus.lnbits.sh b/home.admin/config.scripts/bonus.lnbits.sh index df12ff57c..2d07f9bfa 100644 --- a/home.admin/config.scripts/bonus.lnbits.sh +++ b/home.admin/config.scripts/bonus.lnbits.sh @@ -3,7 +3,7 @@ # https://github.com/lnbits/lnbits # https://github.com/lnbits/lnbits/releases -tag="0.11.3" +tag="0.12.4" VERSION="${tag}" # command info @@ -129,12 +129,12 @@ if [ "$1" = "menu" ]; then # display possible problems with IP2TOR setup if [ ${#ip2torWarn} -gt 0 ]; then whiptail --title " Warning " \ - --yes-button "Back" \ - --no-button "Continue Anyway" \ - --yesno "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: https://${localIP}:${httpsPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 14 72 + --yes-button "Back" \ + --no-button "Continue Anyway" \ + --yesno "Your IP2TOR+LetsEncrypt may have problems:\n${ip2torWarn}\n\nCheck if locally responding: https://${localIP}:${httpsPort}\n\nCheck if service is reachable over Tor:\n${toraddress}" 14 72 if [ "$?" != "1" ]; then exit 0 - fi + fi fi # add info on funding source @@ -148,7 +148,7 @@ if [ "$1" = "menu" ]; then text="https://${localIP}:${httpsPort}${authMethod}" if [ ${#publicDomain} -gt 0 ]; then - text="${text} + text="${text} Public Domain: https://${publicDomain}:${httpsPort} port forwarding on router needs to be active & may change port" fi @@ -225,139 +225,140 @@ Consider adding a IP2TOR Bridge under OPTIONS." WIDTH=66 CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1")) - HEIGHT=$((CHOICE_HEIGHT+7)) + HEIGHT=$((CHOICE_HEIGHT + 7)) CHOICE=$(dialog --clear \ - --title " LNbits - Options" \ - --ok-label "Select" \ - --cancel-label "Back" \ - --menu "Choose one of the following options:" \ - $HEIGHT $WIDTH $CHOICE_HEIGHT \ - "${OPTIONS[@]}" \ - 2>&1 >/dev/tty) + --title " LNbits - Options" \ + --ok-label "Select" \ + --cancel-label "Back" \ + --menu "Choose one of the following options:" \ + $HEIGHT $WIDTH $CHOICE_HEIGHT \ + "${OPTIONS[@]}" \ + 2>&1 >/dev/tty) case $CHOICE in - IP2TOR-ON) - python /home/admin/config.scripts/blitz.subscriptions.ip2tor.py create-ssh-dialog LNBITS ${toraddress} 443 - exit 0 - ;; - IP2TOR-OFF) - clear - python /home/admin/config.scripts/blitz.subscriptions.ip2tor.py subscription-cancel ${ip2torID} - echo - echo "OK - PRESS ENTER to continue" - read key - exit 0 - ;; - HTTPS-ON) - python /home/admin/config.scripts/blitz.subscriptions.letsencrypt.py create-ssh-dialog - exit 0 - ;; - SWITCH-CL) - clear - /home/admin/config.scripts/bonus.lnbits.sh switch cl - echo "Restarting LNbits ..." - sudo systemctl restart lnbits - echo - echo "OK new funding source for LNbits active." - echo "PRESS ENTER to continue" - read key - exit 0 - ;; - SWITCH-LND) - clear - /home/admin/config.scripts/bonus.lnbits.sh switch lnd - echo "Restarting LNbits ..." - sudo systemctl restart lnbits - echo - echo "OK new funding source for LNbits active." - echo "PRESS ENTER to continue" - read key - exit 0 - ;; - BACKUP) - clear - /home/admin/config.scripts/bonus.lnbits.sh backup - echo - echo "Backup done" - echo "PRESS ENTER to continue" - read key - exit 0 - ;; - RESTORE) - clear - # check if backup exist - source <(/home/admin/_cache.sh get LNBitsDB) - if [ "${LNBitsDB}" == "PostgreSQL" ]; then - backup_target="/mnt/hdd/app-data/backup/lnbits_db" - backup_file=$(ls -t $backup_target/*.sql | head -n1) - else - backup_target="/mnt/hdd/app-data/backup/lnbits_sqlite" - backup_file=$(ls -t $backup_target/*.tar | head -n1) - fi - if [ "$backup_file" = "" ]; then - echo "ABORT - No Backup found to restore from" - exit 1 - else - # build dialog to choose backup file from menu - OPTIONS_RESTORE=() + IP2TOR-ON) + python /home/admin/config.scripts/blitz.subscriptions.ip2tor.py create-ssh-dialog LNBITS ${toraddress} 443 + exit 0 + ;; + IP2TOR-OFF) + clear + python /home/admin/config.scripts/blitz.subscriptions.ip2tor.py subscription-cancel ${ip2torID} + echo + echo "OK - PRESS ENTER to continue" + read key + exit 0 + ;; + HTTPS-ON) + python /home/admin/config.scripts/blitz.subscriptions.letsencrypt.py create-ssh-dialog + exit 0 + ;; + SWITCH-CL) + clear + /home/admin/config.scripts/bonus.lnbits.sh switch cl + echo "Restarting LNbits ..." + sudo systemctl restart lnbits + echo + echo "OK new funding source for LNbits active." + echo "PRESS ENTER to continue" + read key + exit 0 + ;; + SWITCH-LND) + clear + /home/admin/config.scripts/bonus.lnbits.sh switch lnd + echo "Restarting LNbits ..." + sudo systemctl restart lnbits + echo + echo "OK new funding source for LNbits active." + echo "PRESS ENTER to continue" + read key + exit 0 + ;; + BACKUP) + clear + /home/admin/config.scripts/bonus.lnbits.sh backup + echo + echo "Backup done" + echo "PRESS ENTER to continue" + read key + exit 0 + ;; + RESTORE) + clear + # check if backup exist + source <(/home/admin/_cache.sh get LNBitsDB) + if [ "${LNBitsDB}" == "PostgreSQL" ]; then + backup_target="/mnt/hdd/app-data/backup/lnbits_db" + backup_file=$(ls -t $backup_target/*.sql | head -n1) + else + backup_target="/mnt/hdd/app-data/backup/lnbits_sqlite" + backup_file=$(ls -t $backup_target/*.tar | head -n1) + fi + if [ "$backup_file" = "" ]; then + echo "ABORT - No Backup found to restore from" + exit 1 + else + # build dialog to choose backup file from menu + OPTIONS_RESTORE=() - counter=0 - cd $backup_target - for f in `find *.* -maxdepth 1 -type f`; do - [[ -f "$f" ]] || continue - counter=$(($counter+1)) - OPTIONS_RESTORE+=($counter "$f") - done + counter=0 + cd $backup_target + for f in $(find *.* -maxdepth 1 -type f); do + [[ -f "$f" ]] || continue + counter=$(($counter + 1)) + OPTIONS_RESTORE+=($counter "$f") + done - WIDTH_RESTORE=66 - CHOICE_HEIGHT_RESTORE=$(("${#OPTIONS_RESTORE[@]}/2+1")) - HEIGHT_RESTORE=$((CHOICE_HEIGHT_RESTORE+7)) - CHOICE_RESTORE=$(dialog --clear \ - --title " LNbits - Backup restore" \ - --ok-label "Select" \ - --cancel-label "Back" \ - --menu "Choose one of the following backups:" \ - $HEIGHT_RESTORE $WIDTH_RESTORE $CHOICE_HEIGHT_RESTORE \ - "${OPTIONS_RESTORE[@]}" \ - 2>&1 >/dev/tty) + WIDTH_RESTORE=66 + CHOICE_HEIGHT_RESTORE=$(("${#OPTIONS_RESTORE[@]}/2+1")) + HEIGHT_RESTORE=$((CHOICE_HEIGHT_RESTORE + 7)) + CHOICE_RESTORE=$(dialog --clear \ + --title " LNbits - Backup restore" \ + --ok-label "Select" \ + --cancel-label "Back" \ + --menu "Choose one of the following backups:" \ + $HEIGHT_RESTORE $WIDTH_RESTORE $CHOICE_HEIGHT_RESTORE \ + "${OPTIONS_RESTORE[@]}" \ + 2>&1 >/dev/tty) - # start restore with selected backup - clear - if [ "$CHOICE_RESTORE" != "" ]; then - backup_file=${backup_target}/${OPTIONS_RESTORE[$(($CHOICE_RESTORE*2-1))]} - /home/admin/config.scripts/bonus.lnbits.sh restore "${backup_file}" - echo - echo "Restore done" - echo "PRESS ENTER to continue" - read key - fi - exit 0 - fi - ;; - MIGRATE-DB) - clear - dialog --title "MIGRATE LNBITS" --yesno " + # start restore with selected backup + clear + if [ "$CHOICE_RESTORE" != "" ]; then + backup_file=${backup_target}/${OPTIONS_RESTORE[$(($CHOICE_RESTORE * 2 - 1))]} + /home/admin/config.scripts/bonus.lnbits.sh restore "${backup_file}" + echo + echo "Restore done" + echo "PRESS ENTER to continue" + read key + fi + exit 0 + fi + ;; + MIGRATE-DB) + clear + dialog --title "MIGRATE LNBITS" --yesno " Do you want to proceed the migration? Try to migrate your LNBits SQLite database to PostgreSQL. This can fail for unknown circumstances. Revert of this process is possible afterwards, a backup will be saved. " 12 65 - if [ $? -eq 0 ]; then - clear - /home/admin/config.scripts/bonus.lnbits.sh migrate - echo - migrateMsg - echo - echo "OK please test your LNBits installation." - echo "PRESS ENTER to continue" - read key - fi - exit 0 - ;; - *) - clear - exit 0 + if [ $? -eq 0 ]; then + clear + /home/admin/config.scripts/bonus.lnbits.sh migrate + echo + migrateMsg + echo + echo "OK please test your LNBits installation." + echo "PRESS ENTER to continue" + read key + fi + exit 0 + ;; + *) + clear + exit 0 + ;; esac exit 0 @@ -381,7 +382,7 @@ if [ "$1" = "status" ]; then # auth method is to call with a certain useer id #admin_userid=$(sudo cat /home/lnbits/lnbits/.super_user) - admin_userid=$(sudo cat /mnt/hdd/app-data/LNBits/data/.super_user); + admin_userid=$(sudo cat /mnt/hdd/app-data/LNBits/data/.super_user) echo "authMethod='/wallet?usr=${admin_userid}'" # check funding source @@ -534,7 +535,7 @@ if [ "$1" = "prestart" ]; then # protect the admin user id if exists # chmod 640 /home/lnbits/lnbits/.super_user 2>/dev/null - chmod 640 /mnt/hdd/app-data/LNBits/data/.super_user 2>/dev/null + chmod 640 /mnt/hdd/app-data/LNBits/data/.super_user 2>/dev/null echo "# OK: prestart finished" exit 0 # exit with clean code @@ -587,21 +588,22 @@ if [ "$1" = "sync" ] || [ "$1" = "repo" ]; then # pull latest code sudo -u lnbits git pull - # check if poetry in installed, if not install it + echo "# check if poetry in installed, if not install it" if ! sudo -u lnbits which poetry; then echo "# install poetry" sudo pip3 install --upgrade pip sudo pip3 install poetry fi - # do install like this + + echo "# install" sudo -u lnbits poetry install - # make sure default virtaulenv is used + echo "# make sure the default virtualenv is used" sudo apt-get remove -y python3-virtualenv 2>/dev/null sudo pip uninstall -y virtualenv 2>/dev/null sudo apt-get install -y python3-virtualenv - # restart lnbits service + echo "# restart lnbits service" sudo systemctl restart lnbits echo "# server is restarting ... maybe takes some seconds until available" exit 0 @@ -619,12 +621,6 @@ if [ "$1" = "install" ]; then exit 0 fi - echo "# *** INSTALL LNBITS ${VERSION} ***" - - # add lnbits user - echo "*** Add the 'lnbits' user ***" - sudo adduser --system --group --home /home/lnbits lnbits - # get optional github parameter githubUser="lnbits" if [ "$2" != "" ]; then @@ -634,17 +630,24 @@ if [ "$1" = "install" ]; then tag="$3" fi + echo "# *** INSTALL LNBITS ***" + echo "# githubUser=$githubUser tag=$tag" + + # add lnbits user + echo "*** Add the 'lnbits' user ***" + sudo adduser --system --group --home /home/lnbits lnbits + # install from GitHub echo "# get the github code user(${githubUser}) branch(${tag})" sudo rm -r /home/lnbits/lnbits 2>/dev/null - cd /home/lnbits || exit 1 + cd /home/lnbits || exit 1 sudo -u lnbits git clone https://github.com/${githubUser}/lnbits lnbits cd /home/lnbits/lnbits || exit 1 sudo -u lnbits git checkout ${tag} || exit 1 # to the install echo "# installing application dependencies" - cd /home/lnbits/lnbits || exit 1 + cd /home/lnbits/lnbits || exit 1 # check if poetry in installed, if not install it if ! sudo -u lnbits which poetry; then @@ -652,7 +655,8 @@ if [ "$1" = "install" ]; then sudo pip3 install --upgrade pip sudo pip3 install poetry fi - # do install like this + + echo "# install" sudo -u lnbits poetry install # make sure default virtaulenv is used @@ -681,7 +685,6 @@ if [ "$1" = "uninstall" ]; then exit 0 fi - # on if [ "$1" = "1" ] || [ "$1" = "on" ]; then @@ -790,7 +793,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # let switch command part do the detail config /home/admin/config.scripts/bonus.lnbits.sh switch ${fundingsource} - cd /home/lnbits/lnbits || exit 1 + cd /home/lnbits/lnbits || exit 1 # open firewall echo @@ -842,13 +845,13 @@ EOF # setup nginx symlinks if ! [ -f /etc/nginx/sites-available/lnbits_ssl.conf ]; then - sudo cp /home/admin/assets/nginx/sites-available/lnbits_ssl.conf /etc/nginx/sites-available/lnbits_ssl.conf + sudo cp /home/admin/assets/nginx/sites-available/lnbits_ssl.conf /etc/nginx/sites-available/lnbits_ssl.conf fi if ! [ -f /etc/nginx/sites-available/lnbits_tor.conf ]; then - sudo cp /home/admin/assets/nginx/sites-available/lnbits_tor.conf /etc/nginx/sites-available/lnbits_tor.conf + sudo cp /home/admin/assets/nginx/sites-available/lnbits_tor.conf /etc/nginx/sites-available/lnbits_tor.conf fi if ! [ -f /etc/nginx/sites-available/lnbits_tor_ssl.conf ]; then - sudo cp /home/admin/assets/nginx/sites-available/lnbits_tor_ssl.conf /etc/nginx/sites-available/lnbits_tor_ssl.conf + sudo cp /home/admin/assets/nginx/sites-available/lnbits_tor_ssl.conf /etc/nginx/sites-available/lnbits_tor_ssl.conf fi sudo ln -sf /etc/nginx/sites-available/lnbits_ssl.conf /etc/nginx/sites-enabled/ sudo ln -sf /etc/nginx/sites-available/lnbits_tor.conf /etc/nginx/sites-enabled/ @@ -1006,7 +1009,7 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then else if (whiptail --title " DELETE DATA? " --yesno "Do you want to delete\nthe LNbits Server Data?" 8 30); then deleteData=1 - else + else deleteData=0 fi fi @@ -1069,7 +1072,7 @@ if [ "$1" = "backup" ]; then else # sqlite backup backup_target="/mnt/hdd/app-data/backup/lnbits_sqlite" - backup_file="lnbits_sqlite_`date +%d`-`date +%m`-`date +%Y`_`date +%H`-`date +%M`_fs.tar" + backup_file="lnbits_sqlite_$(date +%d)-$(date +%m)-$(date +%Y)_$(date +%H)-$(date +%M)_fs.tar" if [ ! -d $backup_target ]; then sudo mkdir -p $backup_target 1>&2 fi @@ -1191,9 +1194,8 @@ if [ "$1" = "migrate" ]; then # execStartPre is not enough, wait for lnbits is finally running count=0 count_max=30 - while ! nc -zv 127.0.0.1 5000 2>/dev/null; - do - count=`expr $count + 1` + while ! nc -zv 127.0.0.1 5000 2>/dev/null; do + count=$(expr $count + 1) echo "wait for LNBIts to start (${count}s/${count_max}s)" sleep 1 if [ $count = $count_max ]; then From c0d07013fcee27b0a4926a23cfad9745bdd898ce Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Wed, 29 May 2024 13:49:16 +0200 Subject: [PATCH 13/16] Update acme.sh & fix duckdns (#4560) * fix dialog info * acme.sh 3.0.7 * use fake email if none given * format email correct * adressing #2255 --- CHANGES.md | 1 + .../blitz.subscriptions.ip2tor.py | 6 +- .../blitz.subscriptions.letsencrypt.py | 6 +- .../config.scripts/blitz.subscriptions.py | 4 +- .../config.scripts/bonus.letsencrypt.sh | 68 +++++++++---------- 5 files changed, 41 insertions(+), 44 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 77b4313cf..42597cf4f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -2,6 +2,7 @@ - New: config.scripts/lnd.signaddress.sh to easy sign messages on addresses on LND [details](https://github.com/raspiblitz/raspiblitz/issues/4540) - Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4) +- Update: acme.sh 3.0.7 (repair duckdns.org dyndns) - Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082) - Remove: IP2Tor Shoplist [details](https://github.com/raspiblitz/raspiblitz/issues/4589) diff --git a/home.admin/config.scripts/blitz.subscriptions.ip2tor.py b/home.admin/config.scripts/blitz.subscriptions.ip2tor.py index e2b0401f5..904b4c147 100755 --- a/home.admin/config.scripts/blitz.subscriptions.ip2tor.py +++ b/home.admin/config.scripts/blitz.subscriptions.ip2tor.py @@ -622,9 +622,9 @@ def menuMakeSubscription(blitzServiceName, torAddress, torPort): if lastusedShop == choice_url_ip2torcom: lastusedShop="" # FULMO Shop - choice_url_fulmo="fulmo7x6yvgz6zs2b2ptduvzwevxmizhq23klkenslt5drxx2physlqd.onion" - choices.append(("B", "Fulmo Shop")) - if lastusedShop == choice_url_fulmo: lastusedShop="" + #choice_url_fulmo="fulmo7x6yvgz6zs2b2ptduvzwevxmizhq23klkenslt5drxx2physlqd.onion" + #choices.append(("B", "Fulmo Shop")) + #if lastusedShop == choice_url_fulmo: lastusedShop="" # add before option if different from static options if len(lastusedShop) > 0: choices.append(("Y", lastusedShop)) diff --git a/home.admin/config.scripts/blitz.subscriptions.letsencrypt.py b/home.admin/config.scripts/blitz.subscriptions.letsencrypt.py index d7c012477..c8a9d2383 100755 --- a/home.admin/config.scripts/blitz.subscriptions.letsencrypt.py +++ b/home.admin/config.scripts/blitz.subscriptions.letsencrypt.py @@ -334,8 +334,10 @@ def subscriptions_cancel(s_id): print(json.dumps(subs, indent=2)) - # todo: deinstall letsencrypt if this was last subscription - + # deinstall letsencrypt/dyndns if this was last subscription + if len(subs['subscriptions_letsencrypt']) == 0: + os.system("/home/admin/config.scripts/bonus.letsencrypt.sh off") + os.system("/home/admin/config.scripts/internet.dyndomain.sh off") def get_subscription(subscription_id): try: diff --git a/home.admin/config.scripts/blitz.subscriptions.py b/home.admin/config.scripts/blitz.subscriptions.py index eae24c06a..310c8f6e5 100755 --- a/home.admin/config.scripts/blitz.subscriptions.py +++ b/home.admin/config.scripts/blitz.subscriptions.py @@ -268,8 +268,8 @@ def main(): cfg.reload() if not cfg.run_behind_tor.value: Dialog(dialog="dialog", autowidgetsize=True).msgbox(''' - The IP2TOR service just makes sense if you run - your RaspiBlitz behind TOR. + The IP2TOR service just makes sense if you + run your RaspiBlitz behind TOR. ''', title="Info") sys.exit(0) diff --git a/home.admin/config.scripts/bonus.letsencrypt.sh b/home.admin/config.scripts/bonus.letsencrypt.sh index 456b48947..dd180ed11 100755 --- a/home.admin/config.scripts/bonus.letsencrypt.sh +++ b/home.admin/config.scripts/bonus.letsencrypt.sh @@ -12,8 +12,9 @@ fi source /mnt/hdd/raspiblitz.conf -ACME_LOAD_BASE_URL="https://codeload.github.com/acmesh-official/acme.sh/tar.gz" -ACME_VERSION="2.8.6" +# https://github.com/acmesh-official/acme.sh/releases +ACME_LOAD_BASE_URL="https://github.com/acmesh-official/acme.sh/archive/refs/tags/3.0.7.tar.gz" +ACME_VERSION="3.0.7" ACME_INSTALL_HOME="/home/admin/.acme.sh" ACME_CONFIG_HOME="/mnt/hdd/app-data/letsencrypt" @@ -21,19 +22,6 @@ ACME_CERT_HOME="${ACME_CONFIG_HOME}/certs" ACME_IS_INSTALLED=0 -# if Tor is on test that CURL is by default running over Tor -# TODO: issue https://github.com/rootzoll/raspiblitz/issues/1341 -#if [ "${runBehindTor}" == "on" ]; then -# echo "# checking if Tor proxy for CURL is working ..." -# checkTor=$(curl -s https://check.torproject.org | grep -c "Congratulations") -# if [ ${checkTor} -eq 0 ]; then -# echo "err='curl tor proxy not working'" -# exit 1 -# else -# echo "# OK Tor proxy for CURL" -# fi -#fi - ################### # FUNCTIONS ################### @@ -70,7 +58,15 @@ function acme_status() { } function acme_install() { + email="${1}" + # create a dummy email if none is provided + if [ -z "${email}" ]; then + random_number=$(shuf -i 100-999 -n 1) + random_word=$(shuf -n 1 /usr/share/dict/words) + ending="x.com" + email="${random_word}${random_number}@gm${ending}" + fi # ensure socat if ! command -v socat >/dev/null; then @@ -79,41 +75,38 @@ function acme_install() { sudo apt-get install -y socat >/dev/null 2>&1 fi + # make sure config directory exists if ! [ -d $ACME_CONFIG_HOME ]; then sudo mkdir -p $ACME_CONFIG_HOME fi sudo chown admin:admin $ACME_CONFIG_HOME - rm -f "/tmp/acme.sh_${ACME_VERSION}.tar.gz" - if ! curl --silent --fail -o "/tmp/acme.sh_${ACME_VERSION}.tar.gz" "${ACME_LOAD_BASE_URL}/${ACME_VERSION}" 2>&1; then - echo "Error ($?): Download failed from: ${ACME_LOAD_BASE_URL}/${ACME_VERSION}" - rm -f "/tmp/acme.sh_${ACME_VERSION}.tar.gz" + # download and install acme.sh + echo "# download acme.sh release ${ACME_VERSION} from ${ACME_LOAD_BASE_URL}" + rm -r /tmp/acme.sh* 2>/dev/null + if ! curl -L --silent --fail -o "/tmp/acme.sh.tar.gz" "${ACME_LOAD_BASE_URL}" 2>&1; then + echo "Error ($?): Download failed from: ${ACME_LOAD_BASE_URL}" + rm -r /tmp/acme.sh* exit 1 fi - if tar xzf "/tmp/acme.sh_${ACME_VERSION}.tar.gz" -C /tmp/; then + if tar xzf "/tmp/acme.sh.tar.gz" -C /tmp/; then cd "/tmp/acme.sh-${ACME_VERSION}" || exit - if [ -n "${email}" ]; then - ./acme.sh --install \ - --noprofile \ - --home "${ACME_INSTALL_HOME}" \ - --config-home "${ACME_CONFIG_HOME}" \ - --cert-home "${ACME_CERT_HOME}" \ - --accountemail "${email}" - else - ./acme.sh --install \ - --noprofile \ - --home "${ACME_INSTALL_HOME}" \ - --config-home "${ACME_CONFIG_HOME}" \ - --cert-home "${ACME_CERT_HOME}" - fi + echo "# installing acme.sh with email(${email})" + ./acme.sh --install \ + --noprofile \ + --home "${ACME_INSTALL_HOME}" \ + --config-home "${ACME_CONFIG_HOME}" \ + --cert-home "${ACME_CERT_HOME}" \ + --accountemail "${email}" + else + echo "# Error ($?): Extracting failed" + exit 1 fi - rm -f "/tmp/acme.sh_${ACME_VERSION}.tar.gz" - rm -Rf "/tmp/acme.sh_${ACME_VERSION}" - + rm -r /tmp/acme.sh* } function refresh_certs_with_nginx() { @@ -219,6 +212,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo chmod -R 733 $ACME_CONFIG_HOME # install the acme script + echo "# acme_install" acme_install "${address}" echo "" From d21348822ca674653bac52f0beec172de5b70670 Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Wed, 29 May 2024 16:16:40 +0200 Subject: [PATCH 14/16] Improve VM install & add Bitcoin Testnet Option (#4579) --- build_sdcard.sh | 25 +-- home.admin/00raspiblitz.sh | 22 +-- home.admin/_background.scan.sh | 28 +-- home.admin/_commands.sh | 12 ++ home.admin/config.scripts/bitcoin.monitor.sh | 16 +- home.admin/config.scripts/bitcoin.testnet.sh | 80 +++++++++ home.admin/config.scripts/blitz.debug.sh | 2 +- home.admin/config.scripts/blitz.hardware.sh | 22 ++- home.admin/config.scripts/blitz.vm.sh | 162 ++++++++++++++++++ .../setup.scripts/controlFinalDialog.sh | 5 + .../setup.scripts/eventBlockchainSync.sh | 2 +- 11 files changed, 315 insertions(+), 61 deletions(-) create mode 100755 home.admin/config.scripts/bitcoin.testnet.sh create mode 100755 home.admin/config.scripts/blitz.vm.sh diff --git a/build_sdcard.sh b/build_sdcard.sh index f80b6df7e..c7404c84d 100644 --- a/build_sdcard.sh +++ b/build_sdcard.sh @@ -369,7 +369,7 @@ echo -e "\n*** SOFTWARE UPDATE ***" # sqlite3 -> database # fdisk -> create partitions # lsb-release -> needed to know which distro version we're running to add APT sources -general_utils="policykit-1 htop git curl bash-completion vim jq dphys-swapfile bsdmainutils autossh telnet vnstat parted dosfstools fbi sysbench build-essential dialog bc python3-dialog unzip whois fdisk lsb-release smartmontools rsyslog resolvconf" +general_utils="sudo policykit-1 htop git curl bash-completion vim jq dphys-swapfile bsdmainutils autossh telnet vnstat parted dosfstools fbi sysbench build-essential dialog bc python3-dialog unzip whois fdisk lsb-release smartmontools rsyslog resolvconf" # add btrfs-progs if not bookworm on aarch64 [ "${architecture}" = "aarch64" ] && ! grep "12 (bookworm)" < /etc/os-release && general_utils="${general_utils} btrfs-progs" # python3-mako --> https://github.com/rootzoll/raspiblitz/issues/3441 @@ -664,18 +664,19 @@ echo -e "\n*** ADDING GROUPS FOR CREDENTIALS STORE ***" echo -e "\n*** SHELL SCRIPTS & ASSETS ***" # copy raspiblitz repo from github cd /home/admin/ || exit 1 -sudo -u admin git config --global user.name "${github_user}" -sudo -u admin git config --global user.email "johndoe@example.com" +sudo -u admin git config --global user.name "${github_user}" || exit 1 +sudo -u admin git config --global user.email "johndoe@example.com" || exit 1 +sudo -u admin git config --global http.postBuffer 524288000 || exit 1 sudo -u admin rm -rf /home/admin/raspiblitz -sudo -u admin git clone -b "${branch}" https://github.com/${github_user}/raspiblitz.git -sudo -u admin cp -r /home/admin/raspiblitz/home.admin/*.* /home/admin -sudo -u admin cp /home/admin/raspiblitz/home.admin/.tmux.conf /home/admin -sudo -u admin cp -r /home/admin/raspiblitz/home.admin/assets /home/admin/ -sudo -u admin chmod +x *.sh -sudo -u admin cp -r /home/admin/raspiblitz/home.admin/config.scripts /home/admin/ -sudo -u admin chmod +x /home/admin/config.scripts/*.sh -sudo -u admin cp -r /home/admin/raspiblitz/home.admin/setup.scripts /home/admin/ -sudo -u admin chmod +x /home/admin/setup.scripts/*.sh +sudo -u admin git clone -b "${branch}" https://github.com/${github_user}/raspiblitz.git || exit 1 +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/*.* /home/admin || exit 1 +sudo -u admin cp /home/admin/raspiblitz/home.admin/.tmux.conf /home/admin || exit 1 +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/assets /home/admin/ || exit 1 +sudo -u admin chmod +x *.sh || exit 1 +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/config.scripts /home/admin/ || exit 1 +sudo -u admin chmod +x /home/admin/config.scripts/*.sh || exit 1 +sudo -u admin cp -r /home/admin/raspiblitz/home.admin/setup.scripts /home/admin/ || exit 1 +sudo -u admin chmod +x /home/admin/setup.scripts/*.sh || exit 1 # install newest version of BlitzPy blitzpy_wheel=$(ls -tR /home/admin/raspiblitz/home.admin/BlitzPy/dist | grep -E "any.whl" | tail -n 1) diff --git a/home.admin/00raspiblitz.sh b/home.admin/00raspiblitz.sh index fa47a2bcc..f8638cb1d 100755 --- a/home.admin/00raspiblitz.sh +++ b/home.admin/00raspiblitz.sh @@ -98,8 +98,7 @@ do network \ chain \ lightning \ - internet_localip \ - system_vm_vagrant \ + internet_localip ) # background.scan is not ready yet @@ -281,25 +280,6 @@ MAINMENU > REPAIR > REPAIR-LND > RETRYSCB #echo "# DURING SETUP: Handle System State (${state})" - # when no HDD on Vagrant - just print info & exit (admin info & exit) - if [ "${state}" == "noHDD" ] && [ ${system_vm_vagrant} != "0" ]; then - echo "***********************************************************" - echo "VAGRANT INFO" - echo "***********************************************************" - echo "To connect a HDD data disk to your VagrantVM:" - echo "- shutdown VM with command: off" - echo "- open your VirtualBox GUI and select RaspiBlitzVM" - echo "- change the 'mass storage' settings" - echo "- add a second 'Primary Slave' drive to the already existing controller" - echo "- close VirtualBox GUI and run: vagrant up & vagrant ssh" - echo "***********************************************************" - echo "You can either create a new dynamic VDI with around 900GB or download" - echo "a VDI with a presynced blockchain to speed up setup. If you dont have 900GB" - echo "space on your laptop you can store the VDI file on an external drive." - echo "***********************************************************" - exit 1 - fi - # for all critical errors (admin info & exit) if [ "${state}" == "error" ] || [ "${state}" == "errorHDD" ]; then clear diff --git a/home.admin/_background.scan.sh b/home.admin/_background.scan.sh index fd3cb5d6d..88e49c823 100755 --- a/home.admin/_background.scan.sh +++ b/home.admin/_background.scan.sh @@ -105,25 +105,11 @@ fi echo "importing: _version.info" /home/admin/_cache.sh import /home/admin/_version.info -# basic hardware info (will not change) -source <(/home/admin/_cache.sh valid \ - system_board \ - system_ram_mb \ - system_ram_gb \ -) -if [ "${stillvalid}" == "0" ]; then - source <(/home/admin/config.scripts/blitz.hardware.sh status) - /home/admin/_cache.sh set system_board "${board}" - /home/admin/_cache.sh set system_ram_mb "${ramMB}" - /home/admin/_cache.sh set system_ram_gb "${ramGB}" -fi - -# VM detect vagrant -source <(/home/admin/_cache.sh valid system_vm_vagrant) -if [ "${stillvalid}" == "0" ]; then - vagrant=$(df | grep -c "/vagrant") - /home/admin/_cache.sh set system_vm_vagrant "${vagrant}" -fi +# get hardware info +source <(/home/admin/config.scripts/blitz.hardware.sh status) +/home/admin/_cache.sh set system_board "${board}" +/home/admin/_cache.sh set system_ram_mb "${ramMB}" +/home/admin/_cache.sh set system_ram_gb "${ramGB}" # flag that init was done (will be checked on each loop) /home/admin/_cache.sh set system_init_time "$(date +%s)" @@ -171,9 +157,7 @@ do fi # ram - ram=$(free -m | grep Mem | awk '{ print $2 }') - ram_avail=$(free -m | grep Mem | awk '{ print $7 }') - /home/admin/_cache.sh set system_ram_mb "${ram}" + ram_avail=$(free -m | grep -E 'Mem|Speicher' | awk '{ print $7 }') /home/admin/_cache.sh set system_ram_available_mb "${ram_avail}" # undervoltage diff --git a/home.admin/_commands.sh b/home.admin/_commands.sh index 4cdedf581..640f625a3 100755 --- a/home.admin/_commands.sh +++ b/home.admin/_commands.sh @@ -55,6 +55,11 @@ function blitzhelp() { echo " cache check on chache system state" echo " github jumping directly into the options to change branch/repo/pr" echo + echo "Development with VM:" + echo " sync sync all repos from shared folder" + echo " sync code sync only main raspiblitz repo from shared folder" + echo " sync api sync only blitz api repo from shared folder" + echo echo "Power:" echo " restart restart the node" echo " off shutdown the node" @@ -215,6 +220,13 @@ function patch() { echo } +# command: sync +# sync VM with shared folder +function sync() { + sudo /home/admin/config.scripts/blitz.vm.sh sync ${1} + echo +} + # command: off function off() { echo "Command to power off your RaspiBlitz" diff --git a/home.admin/config.scripts/bitcoin.monitor.sh b/home.admin/config.scripts/bitcoin.monitor.sh index 38cc933a4..950628bf6 100755 --- a/home.admin/config.scripts/bitcoin.monitor.sh +++ b/home.admin/config.scripts/bitcoin.monitor.sh @@ -148,7 +148,12 @@ if [ "$2" = "info" ]; then if [ "$1" == "signet" ]; then subfolder="signet/" fi - btc_blocks_data_kb=$(sudo du -s /mnt/hdd/bitcoin/${subfolder}blocks | cut -f1) + btc_blocks_data_kb=$(sudo du -s /mnt/hdd/bitcoin/${subfolder}blocks 2>/dev/null | cut -f1) + if [ "${btc_blocks_data_kb}" == "" ]; then + btc_blocks_data_kb="0" + fi + + # print data # parse data btc_blocks_headers=$(echo "${blockchaininfo}" | jq -r '.headers') @@ -156,9 +161,14 @@ if [ "$2" = "info" ]; then btc_blocks_behind=$((${btc_blocks_headers} - ${btc_blocks_verified})) btc_sync_initialblockdownload=$(echo "${blockchaininfo}" | jq -r '.initialblockdownload' | grep -c 'true') btc_sync_progress=$(echo "${blockchaininfo}" | jq -r '.verificationprogress') - if (( $(awk 'BEGIN { print( '${btc_sync_progress}'<0.99995 ) }') )); then + if [[ "${btc_sync_progress}" == *"e-"* ]]; then + # is still very small - round up to 0.01% + btc_sync_percentage="0.01" + elif (( $(awk 'BEGIN { print( '${btc_sync_progress}'<0.99995 ) }') )); then # #3620 prevent displaying 100.00%, although incorrect because of rounding - btc_sync_percentage=$(awk 'BEGIN { printf( "%.2f%%", 100 * '${btc_sync_progress}') }') + btc_sync_percentage="${btc_sync_progress:2:2}.${btc_sync_progress:4:2}" + # remove trailing zero if present (just first one) + btc_sync_percentage="${btc_sync_percentage#0}" elif [ "${btc_blocks_headers}" != "" ] && [ "${btc_blocks_headers}" == "${btc_blocks_verified}" ]; then btc_sync_percentage="100.00" else diff --git a/home.admin/config.scripts/bitcoin.testnet.sh b/home.admin/config.scripts/bitcoin.testnet.sh new file mode 100755 index 000000000..92105829a --- /dev/null +++ b/home.admin/config.scripts/bitcoin.testnet.sh @@ -0,0 +1,80 @@ +#!/bin/bash + +# command info +if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then + echo "# Switches on bitcoind mainnet behind the scenes to testnet." + echo "# !!! JUST USE FOR DEVELOPEMNT - NOT FOR PRODUCTION !!!" + echo "# " + echo "# bitcoin.testnet.sh [activate|revert]" + echo + exit 1 +fi + +# make sure user is root +if [ $UID -ne 0 ]; then + echo "error='run this script with sudo'" + exit 1 +fi + +echo "# Running: bitcoin.testnet.sh $*" + +if [ "$1" == "activate" ]; then + + # check if bitcoin testnet is already activated + testnetSet=$(cat /mnt/hdd/bitcoin/bitcoin.conf | grep -c "^testnet=1") + if [ $testnetSet -gt 0 ]; then + echo "error='testnet is already activated'" + exit 1 + fi + + echo "# SWITCHING TO TESTNET .." + + # make changes to bitcoin.conf + sed -i 's|^testnet=0|testnet=1|' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's/^\(main.debuglogfile=.*\)/#\1/' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's|^test.debuglogfile=/mnt/hdd/bitcoin/testnet3/debug.log|test.debuglogfile=/mnt/hdd/bitcoin/debug.log|' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's/^\(main.rpcbind=.*\)/#\1/' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's|^test.rpcbind=127.0.0.1:18332|test.rpcbind=127.0.0.1:8332|' /mnt/hdd/bitcoin/bitcoin.conf + + # restart bitcoind service + systemctl restart bitcoind.service + + echo "# OK bitcoind should now run testnet on mainnet ports" + echo "# If you want to save space you can delete old mainnet blockchain with:" + echo "# rm -rf /mnt/hdd/bitcoin/blocks" + echo "# rm -rf /mnt/hdd/bitcoin/chainstate" + + exit 0 +fi + +if [ "$1" == "revert" ]; then + + # check if bitcoin testnet is already activated + testnetSet=$(cat /mnt/hdd/bitcoin/bitcoin.conf | grep -c "^testnet=1") + if [ $testnetSet -eq 0 ]; then + echo "error='testnet is not activated'" + exit 1 + fi + + echo "# SWITCHING BACK TO MAINNET .." + + # make changes to bitcoin.conf + sed -i 's|^testnet=1|testnet=0|' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's|^#main.debuglogfile=.*|main.debuglogfile=/mnt/hdd/bitcoin/debug.log|' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's|^test.debuglogfile=/mnt/hdd/bitcoin/debug.log|test.debuglogfile=/mnt/hdd/bitcoin/testnet3/debug.log|' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's|^#main.rpcbind=.*|main.rpcbind=127.0.0.1:8332|' /mnt/hdd/bitcoin/bitcoin.conf + sed -i 's|^test.rpcbind=127.0.0.1:8332|test.rpcbind=127.0.0.1:18332|' /mnt/hdd/bitcoin/bitcoin.conf + + # restart bitcoind service + systemctl restart bitcoind.service + + echo "# OK bitcoind should now run normal mainnet again" + echo "# If you want to save space you can delete old testnet blockchain with:" + echo "# rm -rf /mnt/hdd/bitcoin/testnet3/blocks" + echo "# rm -rf /mnt/hdd/bitcoin/testnet3/chainstate" + + exit 0 +fi + +echo "error='unkown parameter'" +exit 1 \ No newline at end of file diff --git a/home.admin/config.scripts/blitz.debug.sh b/home.admin/config.scripts/blitz.debug.sh index f8e1ad31c..b05517944 100755 --- a/home.admin/config.scripts/blitz.debug.sh +++ b/home.admin/config.scripts/blitz.debug.sh @@ -464,7 +464,7 @@ sudo /home/admin/config.scripts/blitz.zram.sh status echo echo "*** HARDWARE TEST RESULTS ***" -sudo vcgencmd get_throttled +sudo vcgencmd get_throttled 2>/dev/null source <(/home/admin/_cache.sh get system_count_undervoltage) showImproveInfo=0 if [ ${#system_count_undervoltage} -gt 0 ]; then diff --git a/home.admin/config.scripts/blitz.hardware.sh b/home.admin/config.scripts/blitz.hardware.sh index dbc30baab..ebc1ca5e8 100644 --- a/home.admin/config.scripts/blitz.hardware.sh +++ b/home.admin/config.scripts/blitz.hardware.sh @@ -13,11 +13,31 @@ fi # detect known SBCs board="" -isRaspberryPi4=$(cat /proc/device-tree/model | grep -c "Raspberry Pi 4") + +# detect RaspberryPi 3 +isRaspberryPi3=$(cat /proc/device-tree/model 2>/dev/null | grep -c "Raspberry Pi 3") +if [ "${isRaspberryPi3}" == "1" ]; then + board="rp3" +fi + +# detect RaspberryPi 4 +isRaspberryPi4=$(cat /proc/device-tree/model 2>/dev/null | grep -c "Raspberry Pi 4") if [ "${isRaspberryPi4}" == "1" ]; then board="rp4" fi +# detect RaspberryPi 5 +isRaspberryPi5=$(cat /proc/device-tree/model 2>/dev/null | grep -c "Raspberry Pi 5") +if [ "${isRaspberryPi5}" == "1" ]; then + board="rp5" +fi + +# detect VM +isVM=$(grep -c 'hypervisor' /proc/cpuinfo) +if [ ${isVM} -gt 0 ]; then + board="vm" +fi + # get how many RAM (in MB) ramMB=$(awk '/MemTotal/ {printf( "%d\n", $2 / 1024 )}' /proc/meminfo) diff --git a/home.admin/config.scripts/blitz.vm.sh b/home.admin/config.scripts/blitz.vm.sh new file mode 100755 index 000000000..afc9afeec --- /dev/null +++ b/home.admin/config.scripts/blitz.vm.sh @@ -0,0 +1,162 @@ +#!/bin/bash + +# This is for developing on your RaspiBlitz VM + +# command info +if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ] || [ "$1" = "-help" ]; then + echo "FOR DEVELOPMENT USE ONLY!" + echo "RaspiBlitzVM Sync with repos in /mnt/vm_shared_folder" + echo "blitz.vm.sh sync -> syncs all available repos in shared folder" + echo "blitz.vm.sh sync code -> syncs only the raspiblitz repo" + echo "blitz.vm.sh sync api -> syncs only the raspiblitz API repo" + echo "" + exit 1 +fi + +# check runnig as sudo +if [ "$EUID" -ne 0 ]; then + echo "error='please run as root'" + exit 1 +fi + +# check if running in vm +isVM=$(grep -c 'hypervisor' /proc/cpuinfo) +if [ ${isVM} -eq 0 ]; then + echo "# This script is only for RaspiBlitz running in a VM" + echo "error='not a VM'" + exit 1 +fi + +# check if shared folder exists +if [ ! -d "/mnt/vm_shared_folder" ]; then + echo "# Creating shared folder /mnt/vm_shared_folder" + mkdir /mnt/vm_shared_folder + chmod 777 /mnt/vm_shared_folder +fi + +# check if shared folder is mounted +isMounted=$(mount | grep '/mnt/vm_shared_folder') +if [ ${#isMounted} -eq 0 ]; then + echo "# Mounting shared folder /mnt/vm_shared_folder" + mount -t 9p -o trans=virtio share /mnt/vm_shared_folder + if [ $? -eq 0 ]; then + echo "# OK - shared folder mounted" + else + echo "# make sure to activate shared folder in VM settings (VirtFS)" + echo "error='mount failed'" + exit 1 + fi +fi + +# RASPIBLITZ MAIN REPO +if [ "$2" == "code" ] || [ "$2" == "" ]; then + + echo + echo "# ##### RASPIBLITZ REPO" + + #check if contains a raspiblitz MAIN repo + containsRaspiBlitzRepo=$(ls /mnt/vm_shared_folder | grep -wc 'raspiblitz') + if [ ${containsRaspiBlitzRepo} -eq 0 ]; then + + echo "# /mnt/vm_shared_folder does not contain a raspiblitz repo" + echo "# make sure to share the directory that contains the raspiblitz repo - not the repo itself" + echo "# make sure its named 'raspiblitz' and not 'raspiblitz-main' or 'raspiblitz-v1.7'" + + if [ "$2" != "" ]; then + echo "error='no raspiblitz main repo'" + exit 1 + fi + + else + + cd /home/admin + echo "# COPYING from VM SHARED FOLDER to /home/admin/" + echo "# - basic admin files" + rm -f *.sh + su - admin -c 'cp /mnt/vm_shared_folder/raspiblitz/home.admin/.tmux.conf /home/admin' + su - admin -c 'cp /mnt/vm_shared_folder/raspiblitz/home.admin/*.* /home/admin 2>/dev/null' + su - admin -c 'chmod 755 *.sh' + echo "# - asset directory" + rm -rf assets + su - admin -c 'cp -R /mnt/vm_shared_folder/raspiblitz/home.admin/assets /home/admin/assets' + echo "# - config.scripts directory" + rm -rf /home/admin/config.scripts + su - admin -c 'cp -R /mnt/vm_shared_folder/raspiblitz/home.admin/config.scripts /home/admin/config.scripts' + su - admin -c 'chmod 755 /home/admin/config.scripts/*.sh' + su - admin -c 'chmod 755 /home/admin/config.scripts/*.py' + echo "# - setup.scripts directory" + rm -rf /home/admin/setup.scripts + su - admin -c 'cp -R /mnt/vm_shared_folder/raspiblitz/home.admin/setup.scripts /home/admin/setup.scripts' + su - admin -c 'chmod 755 /home/admin/setup.scripts/*.sh' + su - admin -c 'chmod 755 /home/admin/config.scripts/*.py' + echo "# ******************************************" + + if [ "$2" != "" ]; then + exit 0 + fi + + fi +fi + +# RASPIBLITZ API REPO +if [ "$2" == "api" ] || [ "$2" == "" ]; then + + echo + echo "# ##### RASPIBLITZ API REPO" + + # check if blitzapi service is enabled + systemctl is-enabled blitzapi 2>/dev/null + notInstalled=$? + + #check if contains a raspiblitz API repo + containsApiRepo=$(ls /mnt/vm_shared_folder | grep -wc 'blitz_api') + if [ ${containsApiRepo} -eq 0 ]; then + + echo "# /mnt/vm_shared_folder does not contain a api repo" + echo "# make sure to share the directory that contains the api repo - not the repo itself" + echo "# make sure its named 'blitz_api'" + + if [ "$2" != "" ]; then + echo "error='no raspiblitz api repo'" + exit 1 + fi + + elif [ ${notInstalled} -gt 0 ]; then + + echo "# blitzapi service is not installed or enabled - skipping" + if [ "$2" != "" ]; then + echo "error='blitzapi service not enabled'" + exit 1 + fi + + else + + + echo "# TODO: Not implemented yet - use /script/updateBlitzAPI.sh instead to sync from host to VM" + + #echo "# Stopping blitzapi service" + #systemctl stop blitzapi + #echo "# COPYING from VM SHARED FOLDER to /home/blitzapi/" + #rm -rf /home/blitzapi/blitz_api + #cp -R /mnt/vm_shared_folder/blitz_api /home/blitzapi + #chown -R blitzapi:blitzapi /home/blitzapi/blitz_api + #cd /home/blitzapi/blitz_api || exit 1 + #su - blitzapi -c './venv/bin/pip install -r requirements.txt' + #echo "# Starting blitzapi service" + #systemctl start blitzapi + + if [ "$2" != "" ]; then + exit 0 + fi + + fi + +fi + +if [ "$1" == "sync" ]; then + exit 0 +fi + +# in case of unknown command +echo "error='unkown command'" +exit 1 \ No newline at end of file diff --git a/home.admin/setup.scripts/controlFinalDialog.sh b/home.admin/setup.scripts/controlFinalDialog.sh index b57eb5651..f67ce837f 100755 --- a/home.admin/setup.scripts/controlFinalDialog.sh +++ b/home.admin/setup.scripts/controlFinalDialog.sh @@ -44,12 +44,17 @@ if [ "${btc_default_blocks_data_kb}" != "" ] && [ ${btc_default_blocks_data_kb} OPTIONS=() OPTIONS+=(SELFSYNC "Run full self sync/validation (takes long)") OPTIONS+=(COPY "Copy from Computer/RaspiBlitz over LAN (3-10h)") + OPTIONS+=(TESTNET "Sync smaller Testnet (ONLY DEVELOPER)") CHOICESUB=$(dialog --backtitle "RaspiBlitz" --clear --title " Blockchain Sync/Validation " --menu "\nYour Blockchain is not fully synced yet.\nThe full validation might take multiple days to finish.\n\nHow do you want to proceed:" 13 66 7 "${OPTIONS[@]}" 2>&1 >/dev/tty) if [ "${CHOICESUB}" == "COPY" ]; then /home/admin/config.scripts/blitz.copychain.sh target fi + if [ "${CHOICESUB}" == "TESTNET" ]; then + sudo /home/admin/config.scripts/bitcoin.testnet.sh activate + fi + fi ############################################ diff --git a/home.admin/setup.scripts/eventBlockchainSync.sh b/home.admin/setup.scripts/eventBlockchainSync.sh index 654a83116..e0c01b262 100644 --- a/home.admin/setup.scripts/eventBlockchainSync.sh +++ b/home.admin/setup.scripts/eventBlockchainSync.sh @@ -28,7 +28,7 @@ actionString="Please wait - this can take some time" # formatting BLOCKCHAIN SYNC PROGRESS if [ "${btc_default_ready}" == "0" ] || [ "${btc_default_peers}" == "" ]; then - if [ ${system_count_start_blockchain} -gt 1 ]; then + if [ "${system_count_start_blockchain}" != "" ] && [ ${system_count_start_blockchain} -gt 1 ]; then syncProgress="${system_count_start_blockchain} restarts" else syncProgress="waiting for start" From d1e57d6bd2c442056344f06e175001770cf9162e Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Wed, 29 May 2024 16:17:40 +0200 Subject: [PATCH 15/16] #4586 Update LNbits & fix systemd dependency (#4596) * Update LNbits to version 0.12.8 * remove userid from url * remove IP2Tor-on option from menu * revert to old auth method * #4586 systemd wait funding source * chore: Update lnbits.service to fallback to bitcoind.service for funding source --- CHANGES.md | 1 + home.admin/config.scripts/bonus.lnbits.sh | 20 +++++++++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 42597cf4f..7902af76e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,6 +1,7 @@ ## What's new in Version 1.11.1 of RaspiBlitz? - New: config.scripts/lnd.signaddress.sh to easy sign messages on addresses on LND [details](https://github.com/raspiblitz/raspiblitz/issues/4540) +- Update: LNbits 0.12.8 [details](https://github.com/lnbits/lnbits/releases/tag/0.12.8) - Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4) - Update: acme.sh 3.0.7 (repair duckdns.org dyndns) - Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082) diff --git a/home.admin/config.scripts/bonus.lnbits.sh b/home.admin/config.scripts/bonus.lnbits.sh index 2d07f9bfa..132fac14e 100644 --- a/home.admin/config.scripts/bonus.lnbits.sh +++ b/home.admin/config.scripts/bonus.lnbits.sh @@ -3,7 +3,7 @@ # https://github.com/lnbits/lnbits # https://github.com/lnbits/lnbits/releases -tag="0.12.4" +tag="0.12.8" VERSION="${tag}" # command info @@ -201,8 +201,6 @@ Consider adding a IP2TOR Bridge under OPTIONS." # just IP2TOR active - offer cancel or Lets Encrypt OPTIONS+=(HTTPS-ON "Add free HTTPS-Certificate for LNbits") OPTIONS+=(IP2TOR-OFF "Cancel IP2Tor Subscription for LNbits") - else - OPTIONS+=(IP2TOR-ON "Make Public with IP2Tor Subscription") fi # Change Funding Source options (only if available) @@ -802,6 +800,14 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo ufw allow 5001 comment 'lnbits HTTPS' echo + # make sure that systemd starts funding source first + systemdDependency="bitcoind.service" + if [ "${fundingsource}" == "lnd" ]; then + systemdDependency="lnd.service" + elif [ "${fundingsource}" == "cl" ]; then + systemdDependency="lightningd.service" + fi + # install service echo "*** Install systemd ***" cat </dev/null @@ -809,8 +815,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then [Unit] Description=lnbits -Wants=bitcoind.service -After=bitcoind.service +Wants=${systemdDependency} +After=${systemdDependency} [Service] WorkingDirectory=/home/lnbits/lnbits @@ -927,6 +933,10 @@ if [ "$1" = "switch" ]; then exit 1 fi + # make lnd.service fallback + sudo sed -i 's/Wants=lnd.service/Wants=bitcoind.service/' /etc/systemd/system/lnbits.service + sudo sed -i 's/After=lnd.service/After=bitcoind.service/' /etc/systemd/system/lnbits.service + echo "##############" echo "# NOTE: If you switch the funding source of a running LNbits instance all sub account will keep balance." echo "# Make sure that the new funding source has enough sats to cover the LNbits bookeeping of sub accounts." From 770587eee2cb1496323a35af2cb925cd440dc33d Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Wed, 29 May 2024 16:42:49 +0200 Subject: [PATCH 16/16] btcpay update to v1.13.0, signed by web-flow (#4526) * btcpay update to v1.13.0, signed by web-flow * add to CHANGES --- CHANGES.md | 1 + home.admin/config.scripts/bonus.btcpayserver.sh | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 7902af76e..ac3df7a22 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -3,6 +3,7 @@ - New: config.scripts/lnd.signaddress.sh to easy sign messages on addresses on LND [details](https://github.com/raspiblitz/raspiblitz/issues/4540) - Update: LNbits 0.12.8 [details](https://github.com/lnbits/lnbits/releases/tag/0.12.8) - Update: Specter Desktop 2.0.4 with reactivated UPDATE option [details](https://github.com/cryptoadvance/specter-desktop/releases/tag/v2.0.4) +- Update: BTCPayServer 1.13.0 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.13.0) - Update: acme.sh 3.0.7 (repair duckdns.org dyndns) - Remove: Tallycoin-Connect [see service shutdown](https://x.com/djbooth007/status/1784409117563720082) - Remove: IP2Tor Shoplist [details](https://github.com/raspiblitz/raspiblitz/issues/4589) diff --git a/home.admin/config.scripts/bonus.btcpayserver.sh b/home.admin/config.scripts/bonus.btcpayserver.sh index 2f8570a7b..37d06dcbc 100644 --- a/home.admin/config.scripts/bonus.btcpayserver.sh +++ b/home.admin/config.scripts/bonus.btcpayserver.sh @@ -3,22 +3,22 @@ # Based on: https://gist.github.com/normandmickey/3f10fc077d15345fb469034e3697d0d0 # https://github.com/dgarage/NBXplorer/tags -NBXplorerVersion="v2.5.0" +NBXplorerVersion="v2.5.2" # https://github.com/btcpayserver/btcpayserver/releases -BTCPayVersion="v1.12.5" +BTCPayVersion="v1.13.0" # check who signed the release (person that published release) -PGPsigner="nicolasdorier" -PGPpubkeyLink="https://keybase.io/nicolasdorier/pgp_keys.asc" -PGPpubkeyFingerprint="AB4CFA9895ACA0DBE27F6B346618763EF09186FE" +#PGPsigner="nicolasdorier" +#PGPpubkeyLink="https://keybase.io/nicolasdorier/pgp_keys.asc" +#PGPpubkeyFingerprint="AB4CFA9895ACA0DBE27F6B346618763EF09186FE" # --- #PGPsigner="Kukks" #PGPpubkeyLink="https://github.com/${PGPsigner}.gpg" #PGPpubkeyFingerprint="8E5530D9D1C93097" # --- -#PGPsigner="web-flow" -#PGPpubkeyLink="https://github.com/web-flow.gpg" -#PGPpubkeyFingerprint="(4AEE18F83AFDEB23|B5690EEEBB952194)" +PGPsigner="web-flow" +PGPpubkeyLink="https://github.com/web-flow.gpg" +PGPpubkeyFingerprint="B5690EEEBB952194" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then