From fa156fbd526c76c8ea8edd55de908e5ae63028d2 Mon Sep 17 00:00:00 2001 From: openoms <43343391+openoms@users.noreply.github.com> Date: Thu, 13 Apr 2023 11:51:48 +0100 Subject: [PATCH] fulcrum update to v1.9.1, add notes (#3748) --- CHANGES.md | 1 + home.admin/config.scripts/bonus.fulcrum.sh | 37 +++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index c0bf35e2c..6bc20e26e 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -30,6 +30,7 @@ - Update: Circuitbreaker with webUI [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md) - Update: Suez - Channel Visualization for LND & CL [details](https://github.com/prusnak/suez) - Update: Tallycoin Connect v1.8.0 [details](https://github.com/djbooth007/tallycoin_connect/releases/tag/v1.8.0) +- Update: Fulcrum install script (CLI only) v1.9.1 [details](https://github.com/cculianu/Fulcrum/releases/tag/v1.9.1) - Fixed: SCB/Emergency-Backup to USB drive (now also with CLN emergency.recover file) - Info: Run RaspiBlitz on Proxmox [details](https://github.com/rootzoll/raspiblitz/tree/dev/alternative.platforms/Proxmox) - Info: IP2Tor fix fulmo shop & added new ip2tor.com shop diff --git a/home.admin/config.scripts/bonus.fulcrum.sh b/home.admin/config.scripts/bonus.fulcrum.sh index bf008cc9a..fcc1d1502 100644 --- a/home.admin/config.scripts/bonus.fulcrum.sh +++ b/home.admin/config.scripts/bonus.fulcrum.sh @@ -1,7 +1,7 @@ #!/bin/bash # https://github.com/cculianu/Fulcrum/releases -fulcrumVersion="1.7.0" +fulcrumVersion="1.9.1" # command info if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then @@ -12,7 +12,6 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then exit 1 fi - if [ "$1" = on ]; then # ?wait until txindex finishes? /home/admin/config.scripts/network.txindex.sh on @@ -26,6 +25,7 @@ if [ "$1" = on ]; then source <(/home/admin/_cache.sh get state) if [ "${state}" == "ready" ]; then + echo "# Restarting bitcoind" sudo systemctl restart bitcoind fi @@ -51,26 +51,25 @@ if [ "$1" = on ]; then # get the PGP key curl https://raw.githubusercontent.com/Electron-Cash/keys-n-hashes/master/pubkeys/calinkey.txt | sudo -u fulcrum gpg --import - # look for 'Good signature' + echo "# Look for 'Good signature'" sudo -u fulcrum gpg --verify Fulcrum-${fulcrumVersion}-${build}.tar.gz.asc || exit 1 - # look for 'OK' + echo "# Look for 'OK'" sudo -u fulcrum sha256sum -c Fulcrum-${fulcrumVersion}-${build}.tar.gz.sha256sum --ignore-missing || exit 1 - # decompress + echo "# Unpack" sudo -u fulcrum tar -xvf Fulcrum-${fulcrumVersion}-${build}.tar.gz - # create the database directory in /mnt/hdd/app-storage (on the disk) + echo "# Create the database directory in /mnt/hdd/app-storage (on the disk)" sudo mkdir -p /mnt/hdd/app-storage/fulcrum/db sudo chown -R fulcrum:fulcrum /mnt/hdd/app-storage/fulcrum - # create a symlink to /home/fulcrum/.fulcrum + echo "# Create a symlink to /home/fulcrum/.fulcrum" sudo ln -s /mnt/hdd/app-storage/fulcrum /home/fulcrum/.fulcrum sudo chown -R fulcrum:fulcrum /home/fulcrum/.fulcrum - # Create a config file - echo "# Getting RPC credentials from the bitcoin.conf" - #read PASSWORD_B + echo "# Create a config file" + echo "# Get the 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-) echo "\ @@ -96,7 +95,7 @@ tcp = 0.0.0.0:50021 # ssl via nginx " | sudo -u fulcrum tee /home/fulcrum/.fulcrum/fulcrum.conf - # Create a systemd service + echo "# Create a systemd service" echo "\ [Unit] Description=Fulcrum @@ -119,12 +118,10 @@ WantedBy=multi-user.target sudo systemctl enable fulcrum if [ "${state}" == "ready" ]; then + echo "# Starting the fulcrum.service" sudo systemctl start fulcrum fi - # sudo journalctl -fu fulcrum - # sudo systemctl status fulcrum - sudo ufw allow 50021 comment 'Fulcrum TCP' sudo ufw allow 50022 comment 'Fulcrum SSL' @@ -135,7 +132,7 @@ WantedBy=multi-user.target elif [ ${isConfigured} -eq 0 ]; then isStream=$(sudo cat /etc/nginx/nginx.conf 2>/dev/null | grep -c 'stream {') if [ ${isStream} -eq 0 ]; then - echo " + echo " stream { upstream fulcrum { server 127.0.0.1:50021; @@ -152,9 +149,9 @@ stream { } }" | sudo tee -a /etc/nginx/nginx.conf - elif [ ${isStream} -eq 1 ]; then - sudo truncate -s-2 /etc/nginx/nginx.conf - echo " + elif [ ${isStream} -eq 1 ]; then + sudo truncate -s-2 /etc/nginx/nginx.conf + echo " upstream fulcrum { server 127.0.0.1:50021; } @@ -184,8 +181,10 @@ stream { # setting value in raspiblitz config /home/admin/config.scripts/blitz.conf.sh set fulcrum "on" -fi + echo "# Follow the logs with the command:" + echo "sudo journalctl -fu fulcrum" +fi if [ "$1" = off ]; then sudo systemctl disable fulcrum