From 003230d1377333341d57568628a5d8024793cfa7 Mon Sep 17 00:00:00 2001 From: /rootzoll Date: Thu, 7 Mar 2024 12:20:50 +0100 Subject: [PATCH] Fix LNDg (#4420) deactivate LNDg for repair in v1.11.1 --- CHANGES.md | 1 + home.admin/00settingsMenuServices.sh | 2 +- home.admin/config.scripts/blitz.passwords.sh | 2 +- home.admin/config.scripts/bonus.lndg.sh | 15 ++++++++++++++- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 2a3dc45de..765c95133 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -26,6 +26,7 @@ - Experimental: LNDK (runs on top of LND to help forward onion messages (BOLT 12)) [details](https://github.com/lndk-org/lndk) - Fix: PyBlock 2.2.3 [details](https://github.com/curly60e/pyblock/blob/master/README.md) - Refactor: Wifi config with file on sd card +- Deactivated for Repair: LNDg [details](https://github.com/raspiblitz/raspiblitz/issues/4418) - Deprecated: Homer Dashboard (remove from SSH menus, config script will stay with possible future removal) - Deprecated: Bitcoinminds (remove from SSH menus, config script will stay with possible future removal) - Remove: ItchySats (unmaintained project / in consent with dev) diff --git a/home.admin/00settingsMenuServices.sh b/home.admin/00settingsMenuServices.sh index 1b379417e..aa1c997aa 100755 --- a/home.admin/00settingsMenuServices.sh +++ b/home.admin/00settingsMenuServices.sh @@ -60,7 +60,7 @@ if [ "${lightning}" == "lnd" ] || [ "${lnd}" == "on" ]; then OPTIONS+=(ra 'LND RTL Webinterface' ${rtlWebinterface}) OPTIONS+=(ta 'LND ThunderHub' ${thunderhub}) OPTIONS+=(la 'LND LIT (loop, pool, faraday)' ${lit}) - OPTIONS+=(gb 'LND LNDg (auto-rebalance, auto-fees)' ${lndg}) + #OPTIONS+=(gb 'LND LNDg (auto-rebalance, auto-fees)' ${lndg}) OPTIONS+=(oa 'LND Balance of Satoshis' ${bos}) OPTIONS+=(ya 'LND PyBLOCK' ${pyblock}) OPTIONS+=(ha 'LND ChannelTools (Fund Rescue)' ${chantools}) diff --git a/home.admin/config.scripts/blitz.passwords.sh b/home.admin/config.scripts/blitz.passwords.sh index 7b48c46ec..90a07c2a1 100755 --- a/home.admin/config.scripts/blitz.passwords.sh +++ b/home.admin/config.scripts/blitz.passwords.sh @@ -391,7 +391,7 @@ elif [ "${abcd}" = "b" ]; then # LNDg if [ "${lndg}" == "on" ]; then echo "# changing the password for lndg" - sudo -u lndg /home/lndg/lndg/.venv/bin/python /home/lndg/lndg/initialize.py -pw ${newPassword} + /home/admin/config.scripts/bonus.lndg.sh set-password "${newPassword}" fi # mempool Explorer diff --git a/home.admin/config.scripts/bonus.lndg.sh b/home.admin/config.scripts/bonus.lndg.sh index dcec9b8b7..35f238a93 100644 --- a/home.admin/config.scripts/bonus.lndg.sh +++ b/home.admin/config.scripts/bonus.lndg.sh @@ -1,7 +1,10 @@ #!/bin/bash +# github users to ping on issues: +# allyourbankarebelongtous + # https://github.com/cryptosharks131/lndg -VERSION="1.7.0" +VERSION="1.8.0" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then @@ -128,6 +131,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # INSTALL ############### + echo "# LNDg user ..." + # create lndg user sudo adduser --system --group --home /home/lndg lndg # add user to group with admin access to lnd @@ -137,6 +142,8 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then # create symlink sudo ln -s /mnt/hdd/app-data/lnd/ /home/lndg/.lnd + echo "# LNDg download and install ..." + # download and install sudo -u lndg git clone https://github.com/cryptosharks131/lndg.git /home/lndg/lndg/ cd /home/lndg/lndg/ || exit 1 @@ -145,9 +152,13 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then sudo -u lndg virtualenv -p python3 .venv sudo -u lndg .venv/bin/pip install -r requirements.txt PASSWORD_B=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-) + echo "# LNDg initialize.py ..." sudo -u lndg .venv/bin/python initialize.py -pw $PASSWORD_B + echo "# LNDg jobs.py ..." sudo -u lndg .venv/bin/python jobs.py + echo "# LNDg database ..." + # set database path to HDD data so that its survives updates and migrations # first check and see if a database exists isDatabase=$(sudo ls /mnt/hdd/app-data/lndg/data/db.sqlite3 2>/dev/null | grep -c 'db.sqlite3') @@ -221,6 +232,8 @@ if __name__ == '__main__': # gunicorn install ################## + echo "# LNDg gunicorn ..." + # first install and configure whitenoise sudo /home/lndg/lndg/.venv/bin/pip install whitenoise sudo rm /home/lndg/lndg/lndg/settings.py