suez update and improvements (#3615)

* suez update and improvements
This commit is contained in:
openoms
2023-01-18 14:13:33 +00:00
committed by GitHub
parent 2ce930e9e2
commit cde7eb1310
4 changed files with 39 additions and 23 deletions

View File

@@ -28,6 +28,7 @@
- Update: Balance of Satoshis 13.15.0 (bos) [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#13150)
- Update: lndmanage 0.14.2 [details](https://github.com/bitromortac/lndmanage)
- 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)
- 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 unavailable & deactivated in SSH menus [details](https://github.com/rootzoll/raspiblitz/issues/3417#issuecomment-1310303480)

View File

@@ -35,11 +35,11 @@ fi
OPTIONS+=(SEED "Show Wallet Seed Words")
if [ "${clWatchtowerClient}" == "on" ] && [ "${CHAIN}" == "mainnet" ]; then
OPTIONS+=(WATCHTOWER "Watchtower Client Options")
fi
fi
OPTIONS+=(REPAIR-CL "Repair options for Core Lightning")
if [ "${lightning}" != "cl" ] && [ "${CHAIN}" == "mainnet" ]; then
OPTIONS+=(SWITCHLN "Use Core Lightning as default")
fi
fi
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$((CHOICE_HEIGHT+6))
@@ -92,12 +92,9 @@ case $CHOICE in
if [ ! -f /home/bitcoin/suez/suez ];then
/home/admin/config.scripts/bonus.suez.sh on
fi
cd /home/bitcoin/suez || exit 0
command="sudo -u bitcoin /home/bitcoin/.local/bin/poetry run ./suez --client=c-lightning --client-args=--conf=${CLCONF}"
echo "# Running the command:"
echo "${command}"
cd /home/bitcoin/suez || exit 1
echo
$command
sudo -u bitcoin /home/bitcoin/.local/bin/poetry run ./suez --client=c-lightning --client-args=--conf=${CLCONF}
echo
echo "Press ENTER to return to main menu."
read key
@@ -111,7 +108,7 @@ case $CHOICE in
/home/admin/99clRepairMenu.sh $CHAIN
;;
SWITCHLN)
clear
clear
echo
# setting value in the raspiblitz.conf
/home/admin/config.scripts/blitz.conf.sh set lightning "cl"
@@ -123,4 +120,4 @@ case $CHOICE in
;;
esac
exit 0
exit 0

View File

@@ -81,6 +81,7 @@ function blitzhelp() {
echo " manage use the lndmanage bonus app"
echo " whitepaper download the whitepaper from the blockchain to /home/admin/bitcoin.pdf"
echo " notifyme wrapper for blitz.notify.sh that will send a notification using the configured method and settings"
echo " suez visualize channels (for the default ln implementation and chain when installed)"
echo
echo "LND:"
echo " lncli LND commandline interface (when installed)"
@@ -89,7 +90,7 @@ function blitzhelp() {
echo " fwdreport show forwarding report"
echo
echo "CLN:"
echo " lightning-cli Core-Lightning commandline interface (when installed)"
echo " lightning-cli Core Lightning commandline interface (when installed)"
}
# command: raspiblitz
@@ -540,3 +541,28 @@ function lnproxy() {
curl https://lnproxy.org/api/${1}
fi
}
# command: suez
function suez() {
source /mnt/hdd/raspiblitz.conf
if [ ${lightning} = 'cl' ] || [ ${lightning} = 'lnd' ]; then
if [ ! -f /home/bitcoin/suez/suez ];then
/home/admin/config.scripts/bonus.suez.sh on
fi
source <(/home/admin/config.scripts/network.aliases.sh getvars ${lightning} ${chain}net)
cd /home/bitcoin/suez || exit 1
clear
echo "# Showing the channels of ${lightning} ${chain}net - consider reducing the font size (press CTRL- or CMD-)"
if [ ${lightning} = cl ]; then
sudo -u bitcoin /home/bitcoin/.local/bin/poetry run ./suez \
--client=c-lightning --client-args=--conf=${CLCONF}
elif [ ${lightning} = lnd ]; then
sudo -u bitcoin /home/bitcoin/.local/bin/poetry run ./suez \
--client-args=-n=${CHAIN} \
--client-args=--rpcserver=localhost:1${L2rpcportmod}009
fi
cd
else
echo "# Lightning is ${lightning}"
fi
}

View File

@@ -1,7 +1,7 @@
#!/bin/bash
# https://github.com/prusnak/suez/commits/master
SUEZVERSION="e402edbddb45d8a53af346b8582243f4068ece6c"
SUEZVERSION="bcfd3502ac1f7d95b90c62c1daeae50aa7052be7"
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@@ -12,7 +12,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
fi
PGPsigner="prusnak"
PGPpubkeyLink="https://github.com/${PGPsigner}.gpg"
PGPpubkeyLink="https://rusnak.io/public/pgp.txt"
PGPpubkeyFingerprint="91F3B339B9A02A3D"
source /mnt/hdd/raspiblitz.conf
@@ -21,8 +21,7 @@ source /mnt/hdd/raspiblitz.conf
if [ "$1" = "menu" ]; then
dialog --title " Info Suez" --msgbox "
Suez is a command line tool.
Type: 'suez' for the default channel visualization for LND
Type: 'suez --help' in the command line to see the usage options.
Type: 'suez' to visualize the channels of the default ln instance
Readme: https://github.com/prusnak/suez#readme
" 10 75
exit 0
@@ -46,11 +45,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" || exit 1
sudo -u bitcoin /home/bitcoin/.local/bin/poetry install
echo "# Adding alias"
sudo -u admin touch /home/admin/_aliases
echo "alias suez='cd /home/bitcoin/suez && sudo -u bitcoin /home/bitcoin/.local/bin/poetry run ./suez'"\
| sudo tee -a /home/admin/_aliases
# setting value in raspi blitz config
/home/admin/config.scripts/blitz.conf.sh set suez "on"
@@ -65,16 +59,14 @@ fi
# switch off
if [ "$1" = "0" ] || [ "$1" = "off" ]; then
echo "# REMOVING SUEZ"
sudo rm -rf /home/bitcoin/suez
echo "# OK, suez is removed."
echo "# OK, Suez is removed."
# setting value in raspi blitz config
/home/admin/config.scripts/blitz.conf.sh set suez "off"
exit 0
fi
# update
@@ -98,4 +90,4 @@ if [ "$1" = "update" ]; then
fi
echo "FAIL - Unknown Parameter $1"
exit 1
exit 1