Compare commits

..

6 Commits

Author SHA1 Message Date
rootzoll
53f6603e06 v1.11.4 torrent files 2024-12-24 03:04:20 +01:00
rootzoll
cdfa855c2c Release CHANGES v1.11.4 2024-12-23 21:06:18 +01:00
rootzoll
fbcd2b8381 RaspiBlitz v1.11.4rc2 SHA256 2024-12-20 21:23:17 +01:00
rootzoll
88d8e92067 RaspiBlitz v1.11.4rc2 2024-12-20 21:22:14 +01:00
/rootzoll
4cfdeada08 Merge pull request #4897 from raspiblitz/prepare-v1.11.4
v1.11.4rc2
2024-12-19 23:27:36 +01:00
/rootzoll
3d46020afc Small Fixes for v1.11.4 (#4890)
* v1.11.4rc1 & AlbyHub 1.12.0
* #4864 Core Lightning 24.11.1
* #4884 revert back to former version
* #4891 account for pending closing balance (#4892)
* #4876 adding Allow New User Switch
* #4882 revert back to CLN v24.11
* #4893 temp re-introduce en_GB for v1.11.4
2024-12-19 19:13:29 +01:00
8 changed files with 93 additions and 123 deletions

View File

@@ -1,14 +1,22 @@
## What's new in Version 1.11.4 of RaspiBlitz? ## What's new in Version 1.11.4 of RaspiBlitz?
ReleaseCandidate: https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.11.4rc1-2024-12-18.img.gz
Small AlbyHub feature release with security/bug-fixing relevant updates. Small AlbyHub feature release with security/bug-fixing relevant updates.
- New: AlbyHub v1.12.0 (SSH & WebUI) [details](https://github.com/getAlby) - New: AlbyHub v1.12.0 (SSH & WebUI) [details](https://github.com/getAlby)
- New: SSH-Option to tirn on/off LNbits AdminUI [details](https://github.com/raspiblitz/raspiblitz/issues/4876) - New: SSH-Option to turn on/off LNbits AdminUI [details](https://github.com/raspiblitz/raspiblitz/issues/4876)
- Update: LND v0.18.3-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.18.3-beta) - Update: LND v0.18.3-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.18.3-beta)
- Update: Core Lightning v24.11 [details](https://github.com/ElementsProject/lightning/releases/tag/v24.11) - Update: Core Lightning v24.11 [details](https://github.com/ElementsProject/lightning/releases/tag/v24.11)
<u>Minimal-Image:</u>
https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.11.4-2024-12-24.img.gz<br>
Signature: https://raspiblitz.fulmo.org/images/raspiblitz-min-v1.11.4-2024-12-24.img.gz.sig<br>
SHA256: 3d874e8e2518bb9db79df196d1dd7e6d567a0608a3df568cadef87a77b4d3841
<u>Fatpack-Image:</u>
https://raspiblitz.fulmo.org/images/raspiblitz-fat-v1.11.4-2024-12-24.img.gz<br>
Signature: https://raspiblitz.fulmo.org/images/raspiblitz-fat-v1.11.4-2024-12-24.img.gz.sig<br>
SHA256: 31877d0085c20f34bf2bedeeec6bd4abc108595a4b0985d273ddaba2b0fbe654
## What's new in Version 1.11.3 of RaspiBlitz? ## What's new in Version 1.11.3 of RaspiBlitz?
Optimized now to run also on plain debian12 linux for Proxmox/VM & x86 systems. Optimized now to run also on plain debian12 linux for Proxmox/VM & x86 systems.

View File

@@ -3,111 +3,42 @@
# load raspiblitz config data (with backup from old config) # load raspiblitz config data (with backup from old config)
source /home/admin/raspiblitz.info source /home/admin/raspiblitz.info
source /mnt/hdd/raspiblitz.conf source /mnt/hdd/raspiblitz.conf
if [ ${#network} -eq 0 ]; then network=$(cat .network); fi if [ ${#network} -eq 0 ]; then network=`cat .network`; fi
if [ ${#network} -eq 0 ]; then network="bitcoin"; fi if [ ${#network} -eq 0 ]; then network="bitcoin"; fi
if [ ${#chain} -eq 0 ]; then if [ ${#chain} -eq 0 ]; then
chain=$(${network}-cli getblockchaininfo | jq -r '.chain') chain=$(${network}-cli getblockchaininfo | jq -r '.chain')
fi fi
source <(/home/admin/config.scripts/network.aliases.sh getvars $1 $2)
if [ $LNTYPE = cl ];then
# https://lightning.readthedocs.io/lightning-close.7.html
peerlist=$($lightningcli_alias listpeers|grep '"id":'|awk '{print $2}'|cut -d, -f1)
# to display
function cl_closeall_command {
for i in $peerlist; do
# close id [unilateraltimeout] [destination] [fee_negotiation_step] [*wrong_funding*]
echo "$lightningcli_alias close $i 30;"
done
}
command=$(cl_closeall_command)
# to run
function cl_closeall {
for i in $peerlist; do
# close id [unilateraltimeout] [destination] [fee_negotiation_step] [*wrong_funding*]
echo "# Attempting a mutual close one-by-one with a 30 seconds timeout"
$lightningcli_alias close $i 30
done
}
elif [ $LNTYPE = lnd ];then
# precheck: AutoPilot # precheck: AutoPilot
if [ "${autoPilot}" = "on" ]; then if [ "${autoPilot}" = "on" ]; then
dialog --title 'Info' --msgbox 'You need to turn OFF the LND AutoPilot first,\nso that closed channels are not opening up again.\nYou find the AutoPilot -----> SERVICES section' 7 55 dialog --title 'Info' --msgbox 'You need to turn OFF the LND AutoPilot first,\nso that closed channels are not opening up again.\nYou find the AutoPilot -----> SERVICES section' 7 55
exit 0
fi
# User choice for close type
close_type=$(dialog --clear \
--title "LND Channel Close Type" \
--menu "Choose how to close channels:" \
14 54 3 \
"COOP" "Attempt Cooperative Close" \
"FORCE" "Force Close Channels" \
2>&1 >/dev/tty)
# Set command based on user choice
if [ "$close_type" = "COOP" ]; then
command="$lncli_alias closeallchannels"
elif [ "$close_type" = "FORCE" ]; then
command="$lncli_alias closeallchannels --force"
else
echo "Invalid choice. Exiting."
exit 1 exit 1
fi fi
fi
command="lncli --chain=${network} --network=${chain}net closeallchannels --force"
clear clear
echo echo "***********************************"
echo "# Precheck" # PRECHECK) check if chain is in sync echo "Closing All Channels (EXPERIMENTAL)"
if [ $LNTYPE = cl ];then echo "***********************************"
BLOCKHEIGHT=$($bitcoincli_alias getblockchaininfo|grep blocks|awk '{print $2}'|cut -d, -f1) echo ""
CLHEIGHT=$($lightningcli_alias getinfo | jq .blockheight) echo "COMMAND LINE: "
if [ $BLOCKHEIGHT -eq $CLHEIGHT ];then
chainOutSync=0
else
chainOutSync=1
fi
elif [ $LNTYPE = lnd ];then
chainOutSync=$($lncli_alias getinfo | grep '"synced_to_chain": false' -c)
fi
if [ ${chainOutSync} -eq 1 ]; then
if [ $LNTYPE = cl ];then
echo "# FAIL PRECHECK - '${netprefix}lightning-cli getinfo' blockheight is different from '${netprefix}bitcoind getblockchaininfo' - wait until chain is sync "
elif [ $LNTYPE = lnd ];then
echo "# FAIL PRECHECK - ${netprefix}lncli getinfo shows 'synced_to_chain': false - wait until chain is sync "
fi
echo
echo "# PRESS ENTER to return to menu"
read key
exit 0
else
echo "# OK - the chain is synced"
fi
# raise high focus on lightning channels next 1 hour
/home/admin/_cache.sh focus ln_${LNTYPE}_${CHAIN}_channels_active 0 3600
/home/admin/_cache.sh focus ln_${LNTYPE}_${CHAIN}_channels_inactive 0 3600
/home/admin/_cache.sh focus ln_${LNTYPE}_${CHAIN}_channels_total 0 3600
echo "#####################################"
echo "# Closing All Channels (EXPERIMENTAL)"
echo "#####################################"
echo
echo "# COMMAND LINE: "
echo $command echo $command
echo echo ""
echo "# RESULT:" echo "RESULT:"
# PRECHECK) check if chain is in sync
chainInSync=$(lncli --chain=${network} --network=${chain}net getinfo | grep '"synced_to_chain": true' -c)
if [ ${chainInSync} -eq 0 ]; then
command=""
result="FAIL PRECHECK - lncli getinfo shows 'synced_to_chain': false - wait until chain is sync "
fi
# execute command # execute command
if [ ${#command} -gt 0 ]; then if [ ${#command} -gt 0 ]; then
if [ $LNTYPE = cl ];then
cl_closeall
elif [ $LNTYPE = lnd ];then
${command} ${command}
fi fi
fi
echo echo ""
echo "# OK - please recheck if channels really closed" echo "OK - please recheck if channels really closed"
sleep 5 sleep 5

View File

@@ -234,6 +234,16 @@ Consider adding a IP2TOR Bridge under OPTIONS."
OPTIONS+=(ADMINUI "Deactivate 'Admin UI'") OPTIONS+=(ADMINUI "Deactivate 'Admin UI'")
fi fi
# Allow New Accounts (only if AdminUI is OFF)
allowNewAccountsFalse=$(sudo grep -c "LNBITS_ALLOW_NEW_ACCOUNTS=false" $lnbitsConfig)
if [ ${activatedAdminUI} -eq 0 ]; then
if [ ${allowNewAccountsFalse} -eq 0 ]; then
OPTIONS+=(NEWACCOUNTS "Disable New Accounts")
else
OPTIONS+=(NEWACCOUNTS "Enable New Accounts")
fi
fi
WIDTH=66 WIDTH=66
CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1")) CHOICE_HEIGHT=$(("${#OPTIONS[@]}/2+1"))
HEIGHT=$((CHOICE_HEIGHT + 7)) HEIGHT=$((CHOICE_HEIGHT + 7))
@@ -306,7 +316,27 @@ Consider adding a IP2TOR Bridge under OPTIONS."
sudo sed -i "/^LNBITS_ADMIN_UI=/d" $lnbitsConfig sudo sed -i "/^LNBITS_ADMIN_UI=/d" $lnbitsConfig
sudo bash -c "echo 'LNBITS_ADMIN_UI=false' >> ${lnbitsConfig}" sudo bash -c "echo 'LNBITS_ADMIN_UI=false' >> ${lnbitsConfig}"
fi fi
echo "Restarting LNbits ..." echo "Restarting LNbits to activate new setting ..."
sudo systemctl restart lnbits
echo "PRESS ENTER to continue"
read key
exit 0
;;
NEWACCOUNTS)
clear
echo
if [ ${allowNewAccountsFalse} -eq 0 ]; then
echo "Disable New Accounts"
sudo sed -i "/^LNBITS_ALLOW_NEW_ACCOUNTS=/d" $lnbitsConfig
sudo sed -i "/^# LNBITS_ALLOW_NEW_ACCOUNTS=/d" $lnbitsConfig
sudo bash -c "echo 'LNBITS_ALLOW_NEW_ACCOUNTS=false' >> ${lnbitsConfig}"
else
echo "Enable New Accounts"
sudo sed -i "/^LNBITS_ALLOW_NEW_ACCOUNTS=/d" $lnbitsConfig
sudo sed -i "/^# LNBITS_ALLOW_NEW_ACCOUNTS=/d" $lnbitsConfig
sudo bash -c "echo 'LNBITS_ALLOW_NEW_ACCOUNTS=true' >> ${lnbitsConfig}"
fi
echo "Restarting LNbits to activate new setting ..."
sudo systemctl restart lnbits sudo systemctl restart lnbits
echo "PRESS ENTER to continue" echo "PRESS ENTER to continue"
read key read key

View File

@@ -35,6 +35,12 @@ if [ "$command" = "1" ] || [ "$command" = "on" ]; then
sudo apt install -y postgresql-$PG_VERSION sudo apt install -y postgresql-$PG_VERSION
fi fi
# make sure en_GB locale is available for now - see #4893
echo "# temp fixing locale"
sudo sed -i '/^#en_GB.UTF-8 UTF-8/s/^#//' /etc/locale.gen
sudo sed -i '/^# en_GB.UTF-8 UTF-8/s/^# //' /etc/locale.gen
sudo locale-gen
postgres_datadir="/var/lib/postgresql" # default data dir postgres_datadir="/var/lib/postgresql" # default data dir
postgres_confdir="/etc/postgresql" # default conf dir postgres_confdir="/etc/postgresql" # default conf dir
@@ -62,7 +68,7 @@ if [ "$command" = "1" ] || [ "$command" = "on" ]; then
sudo chown -R postgres:postgres $postgres_datadir sudo chown -R postgres:postgres $postgres_datadir
echo "# Create cluster" echo "# Create cluster"
sudo pg_createcluster --locale en_US.UTF-8 $PG_VERSION main sudo pg_createcluster $PG_VERSION main
sudo pg_ctlcluster $PG_VERSION main start sudo pg_ctlcluster $PG_VERSION main start
elif [ -d /mnt/hdd/app-data/postgresql/$PG_VERSION/main ]; then elif [ -d /mnt/hdd/app-data/postgresql/$PG_VERSION/main ]; then
@@ -79,12 +85,12 @@ if [ "$command" = "1" ] || [ "$command" = "on" ]; then
echo "# Create $PG_VERSION config" echo "# Create $PG_VERSION config"
sudo mkdir -p $postgres_datadir/$PG_VERSION/main sudo mkdir -p $postgres_datadir/$PG_VERSION/main
sudo chown -R postgres:postgres $postgres_datadir sudo chown -R postgres:postgres $postgres_datadir
sudo pg_createcluster --locale en_US.UTF-8 $PG_VERSION main sudo pg_createcluster $PG_VERSION main
sudo pg_ctlcluster $PG_VERSION main start sudo pg_ctlcluster $PG_VERSION main start
echo "Setting default password for postgres user" echo "Setting default password for postgres user"
# start cluster temporarily # start cluster temporarily
sudo systemctl start postgresql sudo systemctl start postgresql
sudo pg_createcluster --locale en_US.UTF-8 $PG_VERSION main sudo pg_createcluster $PG_VERSION main
sudo pg_ctlcluster $PG_VERSION main start sudo pg_ctlcluster $PG_VERSION main start
echo "Setting default password for postgres user" echo "Setting default password for postgres user"
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';"
@@ -108,7 +114,7 @@ if [ "$command" = "1" ] || [ "$command" = "on" ]; then
sudo chown -R postgres:postgres $postgres_datadir sudo chown -R postgres:postgres $postgres_datadir
sudo systemctl start postgresql sudo systemctl start postgresql
sudo systemctl start postgresql@13-main sudo systemctl start postgresql@13-main
sudo pg_createcluster --locale en_US.UTF-8 $PG_VERSION main sudo pg_createcluster $PG_VERSION main
sudo pg_ctlcluster $PG_VERSION main start sudo pg_ctlcluster $PG_VERSION main start
elif [ -d /mnt/hdd/app-data/postgresql/13/main ]; then elif [ -d /mnt/hdd/app-data/postgresql/13/main ]; then
@@ -130,7 +136,7 @@ if [ "$command" = "1" ] || [ "$command" = "on" ]; then
sudo chown -R postgres:postgres $postgres_datadir sudo chown -R postgres:postgres $postgres_datadir
# start cluster temporarily # start cluster temporarily
sudo systemctl start postgresql sudo systemctl start postgresql
sudo pg_createcluster --locale en_US.UTF-8 13 main sudo pg_createcluster 13 main
sudo pg_ctlcluster 13 main start sudo pg_ctlcluster 13 main start
echo "# Setting default password for postgres user" echo "# Setting default password for postgres user"
sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';" sudo -u postgres psql -c "ALTER USER postgres WITH PASSWORD 'postgres';"
@@ -154,7 +160,7 @@ if [ "$command" = "1" ] || [ "$command" = "on" ]; then
sudo chown -R postgres:postgres $postgres_datadir sudo chown -R postgres:postgres $postgres_datadir
sudo systemctl start postgresql sudo systemctl start postgresql
sudo systemctl start postgresql@13-main sudo systemctl start postgresql@13-main
sudo pg_createcluster --locale en_US.UTF-8 13 main sudo pg_createcluster 13 main
sudo pg_ctlcluster 13 main start sudo pg_ctlcluster 13 main start
if [ -d /mnt/hdd/app-data/postgresql/$PG_VERSION ] || pg_lsclusters | grep -q "$PG_VERSION main"; then if [ -d /mnt/hdd/app-data/postgresql/$PG_VERSION ] || pg_lsclusters | grep -q "$PG_VERSION main"; then
@@ -185,24 +191,6 @@ if [ "$command" = "1" ] || [ "$command" = "on" ]; then
fi fi
fi fi
# Setting PostgreSQL locale settings
LOCALE_SETTINGS=(
"lc_messages = 'en_US.UTF-8'"
"lc_monetary = 'en_US.UTF-8'"
"lc_numeric = 'en_US.UTF-8'"
"lc_time = 'en_US.UTF-8'"
)
for setting in "${LOCALE_SETTINGS[@]}"; do
key=$(echo "$setting" | cut -d= -f1 | tr -d ' ')
if ! sudo grep -q "^${key}" /etc/postgresql/$PG_VERSION/main/postgresql.conf; then
echo "# Adding $setting"
echo "$setting" | sudo tee -a /etc/postgresql/$PG_VERSION/main/postgresql.conf
else
echo "# Updating $setting"
sudo sed -i "s|^${key}.*|${setting}|" /etc/postgresql/$PG_VERSION/main/postgresql.conf
fi
done
# start cluster # start cluster
sudo systemctl enable postgresql sudo systemctl enable postgresql
sudo systemctl start postgresql sudo systemctl start postgresql

View File

@@ -162,7 +162,7 @@ if [ "$1" = "install" ]; then
exit 1 exit 1
fi fi
echo echo
echo "- OK the installation of Core Lightning v${installed} is successful" echo "- OK the installation of Core Lightning ${installed} is successful"
exit 0 exit 0
fi fi

View File

@@ -259,6 +259,19 @@ if [ "$2" = "wallet" ]; then
exit 1 exit 1
fi fi
ln_pendingbalance=$($lndcli_alias pendingchannels 2>/dev/null)
if [ "${ln_pendingbalance}" == "" ]; then
echo "error='no data'"
exit 1
fi
ln_pendingonchainbalance_sum=$(echo "${ln_pendingbalance}" | jq -r '
([ .pending_force_closing_channels[].channel.local_balance,
.pending_closing_channels[].channel.local_balance
] | map(tonumber) | add // 0)')
lnd_wallet_onchain_pending=$(( ${lnd_wallet_onchain_pending:-0} + ${ln_pendingonchainbalance_sum:-0} ))
# parse data # parse data
lnd_wallet_channels_balance=$(echo "$ln_channelbalance" | jq -r '.balance') lnd_wallet_channels_balance=$(echo "$ln_channelbalance" | jq -r '.balance')
lnd_wallet_channels_pending=$(echo "$ln_channelbalance" | jq -r '.pending_open_balance') lnd_wallet_channels_pending=$(echo "$ln_channelbalance" | jq -r '.pending_open_balance')