From 812242d712933f0ceac544682f38eb13528afb30 Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Tue, 16 Mar 2021 22:49:13 +0000 Subject: [PATCH] Tested app updates (#2043) --- home.admin/config.scripts/bonus.bos.sh | 6 +- .../config.scripts/bonus.btcpayserver.sh | 71 +++++++------------ .../bonus.cryptoadvance-specter.sh | 2 +- home.admin/config.scripts/bonus.joinmarket.sh | 11 +-- home.admin/config.scripts/bonus.thunderhub.sh | 5 +- 5 files changed, 43 insertions(+), 52 deletions(-) diff --git a/home.admin/config.scripts/bonus.bos.sh b/home.admin/config.scripts/bonus.bos.sh index d55916c8e..5bf8baff4 100755 --- a/home.admin/config.scripts/bonus.bos.sh +++ b/home.admin/config.scripts/bonus.bos.sh @@ -1,9 +1,13 @@ #!/bin/bash +https://github.com/alexbosworth/balanceofsatoshis/blob/ba7c35b42f1bad0dbb0c9c03d64ee34472665029/package.json#L79 +BOSVERSION="8.0.0" + # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then echo "config script to install, update or uninstall Balance of Satoshis" echo "bonus.bos.sh [on|off|menu|update]" + echo "installs the version $BOSVERSION by default" exit 1 fi @@ -61,7 +65,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # install bos # check latest version: # https://github.com/alexbosworth/balanceofsatoshis/blob/master/package.json#L70 - sudo -u bos npm install -g balanceofsatoshis@6.1.0 + sudo -u bos npm install -g balanceofsatoshis@$BOSVERSION if ! [ $? -eq 0 ]; then echo "FAIL - npm install did not run correctly, aborting" exit 1 diff --git a/home.admin/config.scripts/bonus.btcpayserver.sh b/home.admin/config.scripts/bonus.btcpayserver.sh index 26399e005..b20e34200 100755 --- a/home.admin/config.scripts/bonus.btcpayserver.sh +++ b/home.admin/config.scripts/bonus.btcpayserver.sh @@ -3,9 +3,9 @@ # Based on: https://gist.github.com/normandmickey/3f10fc077d15345fb469034e3697d0d0 # https://github.com/dgarage/NBXplorer/releases -NBXplorerVersion="v2.1.47" +NBXplorerVersion="v2.1.49" # https://github.com/btcpayserver/btcpayserver/releases -BTCPayVersion="v1.0.6.3" +BTCPayVersion="v1.0.7.0" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then @@ -32,7 +32,7 @@ if [ "$1" = "status" ]; then echo "httpsPort='23001'" echo "publicIP='${publicIP}'" - # check for LetsEnryptDomain for DynDns + # check for LetsEncryptDomain for DynDns error="" source <(sudo /home/admin/config.scripts/blitz.subscriptions.ip2tor.py ip-by-tor $publicIP) if [ ${#error} -eq 0 ]; then @@ -212,7 +212,7 @@ fi # switch on if [ "$1" = "1" ] || [ "$1" = "on" ]; then - echo "# *** INSTALL BTCPAYSERVER ***" + echo "# INSTALL BTCPAYSERVER" ################## # NGINX @@ -234,7 +234,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo systemctl reload nginx # open the firewall - echo "# *** Updating Firewall ***" + echo "# Updating the firewall" sudo ufw allow 23000 comment 'allow BTCPay HTTP' sudo ufw allow 23001 comment 'allow BTCPay HTTPS' echo @@ -257,7 +257,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then if [ ${isInstalled} -eq 0 ]; then # create btcpay user sudo adduser --disabled-password --gecos "" btcpay 2>/dev/null - cd /home/btcpay + cd /home/btcpay || exit 1 # store BTCpay data on HDD sudo mkdir /mnt/hdd/app-data/.btcpayserver 2>/dev/null @@ -270,14 +270,9 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo ln -s /mnt/hdd/app-data/.btcpayserver /home/btcpay/ 2>/dev/null sudo chown -R btcpay:btcpay /home/btcpay/.btcpayserver - - echo - echo "# ***" echo "# Installing .NET" - echo "# ***" echo - # download dotnet-sdk # https://dotnet.microsoft.com/download/dotnet-core/3.1 # dependencies @@ -353,11 +348,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # NBXplorer echo - echo "# ***" echo "# Install NBXplorer" - echo "# ***" echo - cd /home/btcpay echo "# Downloading NBXplorer source code.." sudo -u btcpay git clone https://github.com/dgarage/NBXplorer.git 2>/dev/null @@ -413,20 +405,15 @@ WantedBy=multi-user.target fi echo - echo "# ***" echo "# getting RPC credentials from the bitcoin.conf" RPC_USER=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcuser | cut -c 9-) PASSWORD_B=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-) - #sudo mv /home/btcpay/.nbxplorer/Main/settings.config /home/btcpay/.nbxplorer/Main/settings.config.backup sudo -u btcpay mkdir -p /home/btcpay/.nbxplorer/Main - touch /home/admin/settings.config - sudo chmod 600 /home/admin/settings.config || exit 1 - cat >> /home/admin/settings.config </dev/null @@ -469,48 +454,46 @@ Restart=on-failure WantedBy=multi-user.target " | sudo tee /etc/systemd/system/btcpayserver.service - echo "# configure BTCPay to use sqlite database" - if ! grep -Eq "^sqlitefile=sqllite.db" /home/btcpay/.btcpayserver/Main/settings.config; then - echo " + echo "# configure BTCPay to use sqllite database" + if [ ! -f /home/btcpay/.btcpayserver/Main/settings.config ] || \ + ! grep -Eq "^sqlitefile=sqllite.db" /home/btcpay/.btcpayserver/Main/settings.config; then + echo "\ ### Database ### sqlitefile=sqllite.db" | sudo tee -a /home/btcpay/.btcpayserver/Main/settings.config + sudo chown btcpay:btcpay /home/btcpay/.btcpayserver/Main/settings.config fi - sudo systemctl daemon-reload - sudo systemctl enable btcpayserver + sudo systemctl daemon-reload + sudo systemctl enable btcpayserver - if [ "${state}" == "ready" ]; then + if [ "${state}" == "ready" ]; then echo "# Starting btcpayserver" sudo systemctl start btcpayserver echo "# Checking for btcpayserver config" - while [ ! -f "/home/btcpay/.btcpayserver/Main/settings.config" ] - do - echo "# Waiting for btcpayserver to start - CTRL+C to abort" - sleep 10 - hasFailed=$(sudo systemctl status btcpayserver | grep -c "Active: failed") - if [ ${hasFailed} -eq 1 ]; then - echo "# seems like starting btcpayserver service has failed - see: systemctl status btcpayserver" - echo "# maybe report here: https://github.com/rootzoll/raspiblitz/issues/214" - fi + while [ ! -f "/home/btcpay/.btcpayserver/Main/settings.config" ]; do + echo "# Waiting for btcpayserver to start - CTRL+C to abort" + sleep 10 + hasFailed=$(sudo systemctl status btcpayserver | grep -c "Active: failed") + if [ ${hasFailed} -eq 1 ]; then + echo "# seems like starting btcpayserver service has failed - see: systemctl status btcpayserver" + echo "# maybe report here: https://github.com/rootzoll/raspiblitz/issues/214" + fi done else echo "# Because the system is not 'ready' the service 'btcpayserver' will not be started at this point .. its enabled and will start on next reboot" fi sudo -u btcpay mkdir -p /home/btcpay/.btcpayserver/Main/ - /home/admin/config.scripts/bonus.btcpayserver.sh write-tls-macaroon else echo "# BTCPay Server is already installed." - if [ "${state}" == "ready" ]; then # start service echo "# start service" sudo systemctl start nbxplorer 2>/dev/null sudo systemctl start btcpayserver 2>/dev/null fi - fi # setting value in raspi blitz config diff --git a/home.admin/config.scripts/bonus.cryptoadvance-specter.sh b/home.admin/config.scripts/bonus.cryptoadvance-specter.sh index 3e7efc51b..596e87b55 100755 --- a/home.admin/config.scripts/bonus.cryptoadvance-specter.sh +++ b/home.admin/config.scripts/bonus.cryptoadvance-specter.sh @@ -1,7 +1,7 @@ #!/bin/bash # https://github.com/cryptoadvance/specter-desktop -pinnedVersion="1.0.0" +pinnedVersion="1.2.2" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then diff --git a/home.admin/config.scripts/bonus.joinmarket.sh b/home.admin/config.scripts/bonus.joinmarket.sh index 2f86a30d9..63a1cd460 100755 --- a/home.admin/config.scripts/bonus.joinmarket.sh +++ b/home.admin/config.scripts/bonus.joinmarket.sh @@ -5,13 +5,14 @@ # https://github.com/openoms/bitcoin-tutorials/tree/master/joinmarket # https://github.com/openoms/joininbox -pinnedVersion="v0.8.0" +JMVERSION="v0.8.2" +JBVERSION="v0.3.2" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then echo "JoinMarket install script to switch JoinMarket on or off" echo "sudo /home/admin/config.scrips/bonus.joinmarket.sh on|off" - echo "Installs the version $pinnedVersion by default." + echo "Installs JoinMarket $pinnedVersion with JoininBox $JBVERSION" exit 1 fi @@ -106,7 +107,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then echo "# installing JoinMarket" sudo -u joinmarket git clone https://github.com/Joinmarket-Org/joinmarket-clientserver cd joinmarket-clientserver - sudo -u joinmarket git reset --hard $pinnedVersion + sudo -u joinmarket git reset --hard $JMVERSION # make install.sh set up jmvenv with -- system-site-packages # and import the PySide2 armf package from the system sudo -u joinmarket sed -i \ @@ -123,14 +124,14 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # don't install PyQt5 - using the system package instead sudo -u joinmarket sed -i "s#^PyQt5==5.14.2##g" requirements/gui.txt sudo -u joinmarket ./install.sh --with-qt - echo "# installed JoinMarket $pinnedVersion" + echo "# installed JoinMarket $JMVERSION" echo "# adding the joininbox menu" sudo rm -rf /home/joinmarket/joininbox sudo -u joinmarket git clone https://github.com/openoms/joininbox.git /home/joinmarket/joininbox # check the latest at: # https://github.com/openoms/joininbox/releases/ - sudo -u joinmarket git reset --hard v0.1.16 + sudo -u joinmarket git reset --hard $JBVERSION sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/* /home/joinmarket/ sudo -u joinmarket cp /home/joinmarket/joininbox/scripts/.* /home/joinmarket/ 2>/dev/null sudo chmod +x /home/joinmarket/*.sh diff --git a/home.admin/config.scripts/bonus.thunderhub.sh b/home.admin/config.scripts/bonus.thunderhub.sh index 7be78cac8..fc0ddb1a9 100755 --- a/home.admin/config.scripts/bonus.thunderhub.sh +++ b/home.admin/config.scripts/bonus.thunderhub.sh @@ -1,9 +1,12 @@ #!/bin/bash +THUBVERSION="v0.12.7" + # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then echo "config script to install, update or uninstall ThunderHub" echo "bonus.thunderhub.sh [on|off|menu|update]" + echo "install $THUBVERSION by default" exit 1 fi @@ -81,7 +84,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo -u thunderhub git clone https://github.com/apotdevin/thunderhub.git /home/thunderhub/thunderhub cd /home/thunderhub/thunderhub # https://github.com/apotdevin/thunderhub/releases - sudo -u thunderhub git reset --hard v0.10.4 + sudo -u thunderhub git reset --hard $THUBVERSION echo "Running npm install and run build..." sudo -u thunderhub npm install if ! [ $? -eq 0 ]; then