mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-03-01 00:59:23 +01:00
* clrest update to v0.10.3, add update option * rtl update to v0.14.0 * c-lightning-rest update to v0.10.5 * add to CHANGES * fix lnd update (cli only) Co-authored-by: openoms <43343391+openoms@users.noreply.github.com>
This commit is contained in:
parent
9878ea8a02
commit
6d1582096d
3 changed files with 61 additions and 11 deletions
|
@ -5,6 +5,8 @@
|
||||||
- Update: LND v0.16.4-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.16.4-beta)
|
- Update: LND v0.16.4-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.16.4-beta)
|
||||||
- Update: Core Lightning v23.05.2 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.05.2)
|
- Update: Core Lightning v23.05.2 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.05.2)
|
||||||
- Update: Electrum Server in Rust (electrs) v0.9.14 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0914-jun-10-2023)
|
- Update: Electrum Server in Rust (electrs) v0.9.14 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0914-jun-10-2023)
|
||||||
|
- Update: C-lightningREST v0.10.5 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.5)
|
||||||
|
- Update: RTL v0.14.0 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.14.0)
|
||||||
- Update: Lightning Terminal v0.10.1-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.10.1-alpha)
|
- Update: Lightning Terminal v0.10.1-alpha [details](https://github.com/lightninglabs/lightning-terminal/releases/tag/v0.10.1-alpha)
|
||||||
- Update: LNDg v1.7.0 [details](https://github.com/cryptosharks131/lndg)
|
- Update: LNDg v1.7.0 [details](https://github.com/cryptosharks131/lndg)
|
||||||
- Update: Thunderhub v0.13.19 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.19)
|
- Update: Thunderhub v0.13.19 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.13.19)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://github.com/Ride-The-Lightning/RTL/releases
|
# https://github.com/Ride-The-Lightning/RTL/releases
|
||||||
RTLVERSION="v0.13.6"
|
RTLVERSION="v0.14.0"
|
||||||
|
|
||||||
# check and load raspiblitz config
|
# check and load raspiblitz config
|
||||||
# to know which network is running
|
# to know which network is running
|
||||||
|
@ -574,16 +574,16 @@ if [ "$1" = "update" ]; then
|
||||||
# unset $1
|
# unset $1
|
||||||
set --
|
set --
|
||||||
UPSTREAM=${1:-'@{u}'}
|
UPSTREAM=${1:-'@{u}'}
|
||||||
LOCAL=$(git rev-parse @)
|
LOCAL=$(sudo -u rtl git rev-parse @)
|
||||||
REMOTE=$(git rev-parse "$UPSTREAM")
|
REMOTE=$(sudo -u rtl git rev-parse "$UPSTREAM")
|
||||||
if [ $LOCAL = $REMOTE ]; then
|
if [ $LOCAL = $REMOTE ]; then
|
||||||
TAG=$(git tag | sort -V | grep -v rc | tail -1)
|
TAG=$(sudo -u rtl git tag | sort -V | grep -v rc | tail -1)
|
||||||
echo "# You are up-to-date on version" $TAG
|
echo "# You are up-to-date on version" $TAG
|
||||||
else
|
else
|
||||||
echo "# Pulling latest changes..."
|
echo "# Pulling latest changes..."
|
||||||
sudo -u rtl git pull -p
|
sudo -u rtl git pull -p
|
||||||
echo "# Reset to the latest release tag"
|
echo "# Reset to the latest release tag"
|
||||||
TAG=$(git tag | sort -V | grep -v rc | tail -1)
|
TAG=$(sudo -u rtl git tag | sort -V | grep -v rc | tail -1)
|
||||||
sudo -u rtl git reset --hard $TAG
|
sudo -u rtl git reset --hard $TAG
|
||||||
echo "# updating to the latest"
|
echo "# updating to the latest"
|
||||||
# https://github.com/Ride-The-Lightning/RTL#or-update-existing-dependencies
|
# https://github.com/Ride-The-Lightning/RTL#or-update-existing-dependencies
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# https://github.com/Ride-The-Lightning/c-lightning-REST/releases/
|
# https://github.com/Ride-The-Lightning/c-lightning-REST/releases/
|
||||||
CLRESTVERSION="v0.10.2"
|
CLRESTVERSION="v0.10.5"
|
||||||
|
|
||||||
# help
|
# help
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||||
|
@ -13,6 +13,7 @@ if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "--help" ]; then
|
||||||
echo "cl.rest.sh on <mainnet|testnet|signet>"
|
echo "cl.rest.sh on <mainnet|testnet|signet>"
|
||||||
echo "cl.rest.sh connect <mainnet|testnet|signet> [?key-value]"
|
echo "cl.rest.sh connect <mainnet|testnet|signet> [?key-value]"
|
||||||
echo "cl.rest.sh off <mainnet|testnet|signet> <purge>"
|
echo "cl.rest.sh off <mainnet|testnet|signet> <purge>"
|
||||||
|
echo "cl.rest.sh update <mainnet|testnet|signet>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -41,7 +42,7 @@ if [ "$1" = connect ]; then
|
||||||
/home/admin/config.scripts/tor.onion-service.sh ${netprefix}clrest 443 ${portprefix}6100 1>/dev/null
|
/home/admin/config.scripts/tor.onion-service.sh ${netprefix}clrest 443 ${portprefix}6100 1>/dev/null
|
||||||
|
|
||||||
toraddress=$(sudo cat /mnt/hdd/tor/${netprefix}clrest/hostname)
|
toraddress=$(sudo cat /mnt/hdd/tor/${netprefix}clrest/hostname)
|
||||||
hex_macaroon=$(xxd -plain /home/bitcoin/c-lightning-REST/${CLNETWORK}/certs//access.macaroon | tr -d '\n')
|
hex_macaroon=$(xxd -plain /home/bitcoin/c-lightning-REST/${CLNETWORK}/certs/access.macaroon | tr -d '\n')
|
||||||
url="https://${localip}:${portprefix}6100/"
|
url="https://${localip}:${portprefix}6100/"
|
||||||
lndconnect="lndconnect://${toraddress}:443?macaroon=${hex_macaroon}"
|
lndconnect="lndconnect://${toraddress}:443?macaroon=${hex_macaroon}"
|
||||||
# c-lightning-rest://http://your_hidden_service.onion:your_port?&macaroon=your_macaroon_file_in_HEX&protocol=http
|
# c-lightning-rest://http://your_hidden_service.onion:your_port?&macaroon=your_macaroon_file_in_HEX&protocol=http
|
||||||
|
@ -147,10 +148,10 @@ if [ "$1" = on ]; then
|
||||||
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
||||||
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" "${CLRESTVERSION}" || exit 1
|
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" "${CLRESTVERSION}" || exit 1
|
||||||
|
|
||||||
|
export NG_CLI_ANALYTICS=false
|
||||||
sudo -u bitcoin npm install
|
sudo -u bitcoin npm install
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# config
|
|
||||||
cd /home/bitcoin/c-lightning-REST || exit 1
|
cd /home/bitcoin/c-lightning-REST || exit 1
|
||||||
sudo -u bitcoin mkdir ${CLNETWORK}
|
sudo -u bitcoin mkdir ${CLNETWORK}
|
||||||
echo "
|
echo "
|
||||||
|
@ -205,8 +206,9 @@ WantedBy=multi-user.target
|
||||||
fi
|
fi
|
||||||
echo
|
echo
|
||||||
echo "# Monitor with:"
|
echo "# Monitor with:"
|
||||||
echo "sudo journalctl -f -u clrest"
|
echo "sudo journalctl -fu clrest"
|
||||||
echo
|
echo
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$1" = off ]; then
|
if [ "$1" = off ]; then
|
||||||
|
@ -214,11 +216,57 @@ if [ "$1" = off ]; then
|
||||||
sudo systemctl stop ${netprefix}clrest
|
sudo systemctl stop ${netprefix}clrest
|
||||||
sudo systemctl disable ${netprefix}clrest
|
sudo systemctl disable ${netprefix}clrest
|
||||||
sudo rm -rf /home/bitcoin/c-lightning-REST/${CLNETWORK}
|
sudo rm -rf /home/bitcoin/c-lightning-REST/${CLNETWORK}
|
||||||
echo "# Deny port ${portprefix}6100 through the firewall"
|
echo "# Remove the firewall rule"
|
||||||
sudo ufw deny "${portprefix}6100"
|
sudo ufw delete allow "${portprefix}6100"
|
||||||
/home/admin/config.scripts/tor.onion-service.sh off ${netprefix}clrest
|
/home/admin/config.scripts/tor.onion-service.sh off ${netprefix}clrest
|
||||||
if [ "$(echo "$@" | grep -c purge)" -gt 0 ]; then
|
if [ "$(echo "$@" | grep -c purge)" -gt 0 ]; then
|
||||||
echo "# Removing the source code and binaries"
|
echo "# Removing the source code and binaries"
|
||||||
sudo rm -rf /home/bitcoin/c-lightning-REST
|
sudo rm -rf /home/bitcoin/c-lightning-REST
|
||||||
fi
|
fi
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$1" = "update" ]; then
|
||||||
|
echo "# UPDATING c-lightning-REST for ${CHAIN}"
|
||||||
|
cd /home/bitcoin/c-lightning-REST/${CLNETWORK} || exit 1
|
||||||
|
# fetch latest master
|
||||||
|
sudo -u bitcoin git fetch
|
||||||
|
# unset $1
|
||||||
|
set --
|
||||||
|
UPSTREAM=${1:-'@{u}'}
|
||||||
|
LOCAL=$(sudo -u bitcoin git rev-parse @)
|
||||||
|
REMOTE=$(sudo -u bitcoin git rev-parse "$UPSTREAM")
|
||||||
|
if [ "$LOCAL" = "$REMOTE" ]; then
|
||||||
|
TAG=$(sudo -u bitcoin git tag | sort -V | grep -v rc | tail -1)
|
||||||
|
echo "# You are up-to-date on version" "$TAG"
|
||||||
|
else
|
||||||
|
sudo systemctl stop ${netprefix}clrest
|
||||||
|
echo "# Pulling latest changes..."
|
||||||
|
sudo -u bitcoin git pull -p
|
||||||
|
echo "# Reset to the latest release tag"
|
||||||
|
TAG=$(sudo -u bitcoin git tag | sort -V | grep -v rc | tail -1)
|
||||||
|
sudo -u bitcoin git reset --hard "$TAG"
|
||||||
|
sudo -u bitcoin /home/admin/config.scripts/blitz.git-verify.sh \
|
||||||
|
"${PGPsigner}" "${PGPpubkeyLink}" "${PGPpubkeyFingerprint}" "${TAG}" || exit 1
|
||||||
|
echo "# Updating to the latest"
|
||||||
|
echo "# Running npm install ..."
|
||||||
|
export NG_CLI_ANALYTICS=false
|
||||||
|
if sudo -u bitcoin npm install; then
|
||||||
|
echo "# OK - c-lightning-REST install looks good"
|
||||||
|
echo
|
||||||
|
else
|
||||||
|
echo "# FAIL - npm install did not run correctly - deleting code and exit"
|
||||||
|
/home/admin/config.scripts/cl.rest.sh off "" purge
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "# Updated to version" "$TAG"
|
||||||
|
echo
|
||||||
|
echo "# Starting the ${netprefix}clrest service ..."
|
||||||
|
sudo systemctl start ${netprefix}clrest
|
||||||
|
echo
|
||||||
|
fi
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "# FAIL - Unknown Parameter $1"
|
||||||
|
exit 1
|
||||||
|
|
Loading…
Add table
Reference in a new issue