diff --git a/home.admin/99clRepairMenu.sh b/home.admin/99clRepairMenu.sh index e62a71baa..8e45aaaaf 100644 --- a/home.admin/99clRepairMenu.sh +++ b/home.admin/99clRepairMenu.sh @@ -204,7 +204,7 @@ Save this password as it will be needed to restore the backup (same as the Passw source $_temp /home/admin/config.scripts/cl.hsmtool.sh seed-force "$CHAIN" "${seedWords}" sudo rm $_temp 2>/dev/null - if ! sudo ls /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret; then + if ! sudo ls /home/bitcoin/.lightning/${CLNETWORK}/hsm_secret 2>/dev/null; then echo "# There was no hsm_secret created - exiting" exit 15 fi diff --git a/home.admin/config.scripts/bonus.rtl.sh b/home.admin/config.scripts/bonus.rtl.sh index ecfb4a1f5..c84021b97 100755 --- a/home.admin/config.scripts/bonus.rtl.sh +++ b/home.admin/config.scripts/bonus.rtl.sh @@ -1,7 +1,7 @@ #!/bin/bash # https://github.com/Ride-The-Lightning/RTL/releases -RTLVERSION="v0.14.0" +RTLVERSION="v0.14.1" # check and load raspiblitz config # to know which network is running diff --git a/home.admin/config.scripts/cl-plugin.backup.sh b/home.admin/config.scripts/cl-plugin.backup.sh index 0b9b63f13..be4d4f198 100644 --- a/home.admin/config.scripts/cl-plugin.backup.sh +++ b/home.admin/config.scripts/cl-plugin.backup.sh @@ -43,7 +43,7 @@ function install() { sudo pip3 install --upgrade pip # pip dependencies - sudo -u bitcoin pip3 install pyln-client tqdm + sudo -u bitcoin pip3 install pyln-client tqdm psutil # poetry sudo pip3 install poetry || exit 1 @@ -61,7 +61,7 @@ function install() { echo "# The ${plugin} plugin is already loaded" fi - # make sure default virtaulenv is used + # 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 diff --git a/home.admin/config.scripts/cl-plugin.clboss.sh b/home.admin/config.scripts/cl-plugin.clboss.sh index 64b7b5a49..64a52d5ae 100644 --- a/home.admin/config.scripts/cl-plugin.clboss.sh +++ b/home.admin/config.scripts/cl-plugin.clboss.sh @@ -3,7 +3,7 @@ # https://github.com/ZmnSCPxj/clboss/releases # https://github.com/ZmnSCPxj/clboss/commits/master -CLBOSSVERSION="ef5c41612da0d544b0ed1f3e986b4b07126723a1" +CLBOSSVERSION="0673c50e7374ea8f5cb7e302f72b7978c6bd1794" # command info if [ $# -lt 1 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then diff --git a/home.admin/config.scripts/cl.hsmtool.sh b/home.admin/config.scripts/cl.hsmtool.sh index f69919253..6b3a9bf28 100644 --- a/home.admin/config.scripts/cl.hsmtool.sh +++ b/home.admin/config.scripts/cl.hsmtool.sh @@ -171,7 +171,7 @@ function decryptHSMsecret() { if [ "$1" = "new" ] || [ "$1" = "new-force" ] || [ "$1" = "seed" ] || [ "$1" = "seed-force" ]; then # make sure /home/bitcoin/.lightning/bitcoin exists (when lightningd was not run yet) - if ! sudo ls /home/bitcoin/.lightning/bitcoin 1>/dev/null; then + if ! sudo ls /home/bitcoin/.lightning/bitcoin 2>/dev/null; then echo "# Create /home/bitcoin/.lightning/bitcoin/" sudo -u bitcoin mkdir -p /home/bitcoin/.lightning/bitcoin/ fi diff --git a/home.admin/config.scripts/cl.install.sh b/home.admin/config.scripts/cl.install.sh index 88ddb8b39..8abb255a9 100644 --- a/home.admin/config.scripts/cl.install.sh +++ b/home.admin/config.scripts/cl.install.sh @@ -2,21 +2,22 @@ # https://lightning.readthedocs.io/ # https://github.com/ElementsProject/lightning/releases -CLVERSION="v23.08.1" +CLVERSION="v23.11" # install the latest master by using the last commit id # https://github.com/ElementsProject/lightning/commit/master # CLVERSION="063366ed7e3b7cc12a8d1681acc2b639cf07fa23" +# https://github.com/ElementsProject/lightning/tree/master/contrib/keys +# rustyrussell D9200E6CD1ADB8F1 # cdecker A26D6D9FE088ED58 # niftynei BFF0F67810C1EED1 # pneuroth (nepet) C3F21EE387FF4CD2 +PGPsigner="pneuroth" +PGPpubkeyLink="https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/keys/${PGPsigner}.txt" +PGPpubkeyFingerprint="C3F21EE387FF4CD2" + # PGPsigner="endothermicdev" # PGPpubkeyLink="https://github.com/${PGPsigner}.gpg" # PGPpubkeyFingerprint="8F55EE750D950E3E" -# https://github.com/ElementsProject/lightning/tree/master/contrib/keys -PGPsigner="rustyrussell" # rustyrussell D9200E6CD1ADB8F1 # cdecker A26D6D9FE088ED58 # niftynei BFF0F67810C1EED1 # endothermicdev 8F55EE750D950E3E -PGPpubkeyLink="https://raw.githubusercontent.com/ElementsProject/lightning/master/contrib/keys/${PGPsigner}.txt" -PGPpubkeyFingerprint="D9200E6CD1ADB8F1" - # help if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then echo @@ -38,14 +39,18 @@ function installDependencies() { echo "- installDependencies()" # from https://lightning.readthedocs.io/INSTALL.html#to-build-on-ubuntu sudo apt-get install -y \ - autoconf automake build-essential git libtool libgmp-dev \ - libsqlite3-dev python3 net-tools zlib1g-dev libsodium-dev \ - gettext + autoconf automake build-essential git libtool libsqlite3-dev \ + net-tools zlib1g-dev libsodium-dev gettext # additional requirements sudo apt-get install -y postgresql libpq-dev + # for clnrest (since v23.11) + sudo apt-get install -y python3-json5 python3-flask python3-gunicorn # upgrade pip sudo pip3 install --upgrade pip - sudo -u bitcoin pip install mako + # for clnrest + pip3 install mako + cd /home/bitcoin/lightning || exit 1 + sudo -u bitcoin pip3 install --user -r plugins/clnrest/requirements.txt # poetry sudo pip3 install poetry if ! grep -Eq '^PATH="$HOME/.local/bin:$PATH"' /home/bitcoin/.profile; then @@ -56,24 +61,16 @@ function installDependencies() { } function buildAndInstallCLbinaries() { - echo "- Configuring EXPERIMENTAL_FEATURES enabled" + echo "- configure" echo sudo -u bitcoin ./configure echo - echo "- Building Core lightning from source" + echo "- make" echo sudo -u bitcoin make echo - # git reset --hard needed to not show as 'v22.11-modded' - sudo -u bitcoin git reset --hard - echo "- Install to /usr/local/bin/" + echo "- install to /usr/local/bin/" sudo make install || exit 1 - - # make sure default virtaulenv 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 - } echo "# Running: 'cl.install.sh $*'" @@ -269,7 +266,7 @@ if [ "$1" = on ] || [ "$1" = update ] || [ "$1" = testPR ]; then sudo -u bitcoin mkdir /home/bitcoin/.lightning/${CLNETWORK} fi - if ! sudo ls ${CLCONF}; then + if ! sudo ls ${CLCONF} 2>/dev/null; then echo "# Create ${CLCONF}" echo "# lightningd configuration for ${network} ${CHAIN} @@ -316,7 +313,7 @@ always-use-proxy=true ############# echo echo "# Set logrotate for ${netprefix}lightningd" - if ! sudo ls /home/bitcoin/.lightning/${CLNETWORK}/cl.log_old; then + if ! sudo ls /home/bitcoin/.lightning/${CLNETWORK}/cl.log_old 2>/dev/null; then sudo -u bitcoin mkdir /home/bitcoin/.lightning/${CLNETWORK}/cl.log_old fi echo "\ @@ -446,6 +443,8 @@ if [ "$1" = "off" ]; then echo "# Removing the binaries" sudo rm -f /usr/local/bin/lightningd sudo rm -f /usr/local/bin/lightning-cli + echo "# Removing the source code" + sudo rm -rf /home/bitcoin/lightning fi # setting value in the raspiblitz.conf /home/admin/config.scripts/blitz.conf.sh set ${netprefix}cl "off" diff --git a/home.admin/config.scripts/cl.rest.sh b/home.admin/config.scripts/cl.rest.sh index a837b7a64..e7f012557 100644 --- a/home.admin/config.scripts/cl.rest.sh +++ b/home.admin/config.scripts/cl.rest.sh @@ -1,7 +1,7 @@ #!/bin/bash # https://github.com/Ride-The-Lightning/c-lightning-REST/releases/ -CLRESTVERSION="v0.10.5" +CLRESTVERSION="v0.10.7" # help if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then diff --git a/home.admin/config.scripts/cl.setname.sh b/home.admin/config.scripts/cl.setname.sh index e68acc155..683892a4a 100644 --- a/home.admin/config.scripts/cl.setname.sh +++ b/home.admin/config.scripts/cl.setname.sh @@ -30,7 +30,7 @@ if [ ${#newName} -eq 0 ]; then fi # check if cl config file exists -if ! sudo ls ${CLCONF}; then +if ! sudo ls ${CLCONF} 2>/dev/null; then echo "FAIL - missing ${CLCONF}" exit 1 fi diff --git a/home.admin/config.scripts/cl.update.sh b/home.admin/config.scripts/cl.update.sh index 02d8fc4e1..a67cf1928 100644 --- a/home.admin/config.scripts/cl.update.sh +++ b/home.admin/config.scripts/cl.update.sh @@ -20,7 +20,7 @@ mode="$1" # RECOMMENDED UPDATE BY RASPIBLITZ TEAM # comment will be shown as "BEWARE Info" when option is choosen (can be multiple lines) -clUpdateVersion="v23.02.2" # example: v23.02.2 # keep empty if no newer version as sd card build is available +clUpdateVersion="" # example: v23.02.2 # keep empty if no newer version as sd card build is available clUpdateComment="Please keep in mind that downgrading afterwards is not tested. Also not all additional apps are fully tested with the this update - but it looked good on first tests." # GATHER DATA