From 36e25dc3c61604234d360f9e5e5854cb73cf2c10 Mon Sep 17 00:00:00 2001 From: openoms Date: Mon, 20 Sep 2021 12:06:57 +0100 Subject: [PATCH] cln: add CLBOSS to the SETTINGS menu #2295 --- CHANGES.md | 3 +-- home.admin/00settingsMenuBasics.sh | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 128638859..db382724f 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,7 @@ - New: C-lightning v0.10.1 [details](https://github.com/ElementsProject/lightning/releases/tag/v0.10.1) - New: C-lightningREST v0.5.1 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.5.1) - New: CLN plugin: Sparko [details](https://github.com/fiatjaf/sparko) +- New: CLN plugin: CLBOSS The C-Lightning Node Manager [details](https://github.com/ZmnSCPxj/clboss#clboss-the-c-lightning-node-manager) - New: Suez - channel visualization for LND and CLN [details](https://github.com/prusnak/suez) - New: LND Static Channel Backup to Nextcloud - @@ -25,8 +26,6 @@ - Update: Balance of Satoshis 10.7.8 (BOS) + keep data on reinstall [details](https://github.com/alexbosworth/balanceofsatoshis/blob/master/CHANGELOG.md#version-8010) - Update: Circuitbreaker v0.3.0 [details](https://github.com/lightningequipment/circuitbreaker/blob/master/README.md) - - ## What's new in Version 1.7.0 of RaspiBlitz? - New: Raspberry Pi OS Base Image 64-bit (April 2021) diff --git a/home.admin/00settingsMenuBasics.sh b/home.admin/00settingsMenuBasics.sh index 69d393e8f..6e81bea5a 100755 --- a/home.admin/00settingsMenuBasics.sh +++ b/home.admin/00settingsMenuBasics.sh @@ -15,6 +15,7 @@ if [ ${#touchscreen} -eq 0 ]; then touchscreen=0; fi if [ ${#lcdrotate} -eq 0 ]; then lcdrotate=0; fi if [ ${#zerotier} -eq 0 ]; then zerotier="off"; fi if [ ${#circuitbreaker} -eq 0 ]; then circuitbreaker="off"; fi +if [ ${#clboss} -eq 0 ]; then clboss="off"; fi echo "# map LND to on/off" lndNode="off" @@ -85,6 +86,12 @@ if [ ${keysendOn} -eq 0 ]; then keysend="off" fi +echo "# map clboss to on/off" +clbossMenu='off' +if [ ${clboss} -gt 0 ]; then + clbossMenu='on' +fi + # show select dialog echo "run dialog ..." @@ -122,6 +129,9 @@ fi # C-Lightning & options/PlugIns OPTIONS+=(n 'CLN C-LIGHTNING NODE' ${clnNode}) +if [ "${clnNode}" == "on" ]; then + OPTIONS+=(o '-CLN CLBOSS Automatic Node Manager' ${clbossMenu}) +fi CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1")) HEIGHT=$((CHOICE_HEIGHT+6)) @@ -428,6 +438,18 @@ else echo "C-Lightning NODE setting unchanged." fi +# CLBOSS process choice +choice="off"; check=$(echo "${CHOICES}" | grep -c "o") +if [ ${check} -eq 1 ]; then choice="on"; fi +if [ "${clboss}" != "${choice}" ] && [ "${clnNode}" == "on" ]; then + echo "CLBOSS Setting changed .." + anychange=1 + sudo /home/admin/config.scripts/cln-plugin.clboss.sh ${choice} + needsReboot=0 +else + echo "CLBOSS Setting unchanged." +fi + # parallel testnet process choice choice="off"; check=$(echo "${CHOICES}" | grep -c "p") if [ ${check} -eq 1 ]; then choice="on"; fi