From d1e57d6bd2c442056344f06e175001770cf9162e Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Wed, 29 May 2024 16:17:40 +0200 Subject: [PATCH] #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."