mirror of
https://github.com/rootzoll/raspiblitz.git
synced 2025-03-01 00:59:23 +01:00
Fix electrs data dir user at update, update electrs to v0.10.4 (#4480)
* Fix electrs data dir user at update * check and create, fix persmissions of storage dir when on the data disk is not always available yet when the install option is running * apply formatting * fix storage dir before code install check * electrs update v0.10.4 * update in changes --------- Co-authored-by: openoms <oms@tuta.io>
This commit is contained in:
parent
7426a3a287
commit
9e64abc9d9
2 changed files with 61 additions and 53 deletions
|
@ -10,7 +10,7 @@
|
|||
- Update: LND v0.17.3-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.17.3-beta)
|
||||
- Update: Core Lightning v23.11.2 [details](https://github.com/ElementsProject/lightning/releases/tag/v23.11.2)
|
||||
- Update: C-lightningREST v0.10.7 [details](https://github.com/Ride-The-Lightning/c-lightning-REST/releases/tag/v0.10.7)
|
||||
- Update: Electrum Server in Rust (electrs) v0.10.2 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0102-dec-31-2023)
|
||||
- Update: Electrum Server in Rust (electrs) v0.10.4 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#0104-mar-15-2024)
|
||||
- Update: Fulcrum Electrum server v1.10.0 (CLI install script) [details](https://github.com/cculianu/Fulcrum/releases/tag/v1.10.0)
|
||||
- Update: BTC-RPC-Explorer v3.4.0 [details](https://github.com/janoside/btc-rpc-explorer/blob/master/CHANGELOG.md#v340)
|
||||
- Update: JoinMarket v0.9.11 [details](https://github.com/JoinMarket-Org/joinmarket-clientserver/releases/tag/v0.9.11)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
# https://github.com/romanz/electrs/releases
|
||||
ELECTRSVERSION="v0.10.2"
|
||||
ELECTRSVERSION="v0.10.4"
|
||||
|
||||
# command info
|
||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||
|
@ -55,7 +55,10 @@ if [ "$1" = "status" ]; then
|
|||
localPortRunning=$(sudo netstat -an | grep -c '0.0.0.0:50001')
|
||||
echo "localTCPPortActive=${localPortRunning}"
|
||||
|
||||
publicPortRunning=$(nc -z -w6 ${publicip} 50001 2>/dev/null; echo $?)
|
||||
publicPortRunning=$(
|
||||
nc -z -w6 ${publicip} 50001 2>/dev/null
|
||||
echo $?
|
||||
)
|
||||
if [ "${publicPortRunning}" == "0" ]; then
|
||||
# OK looks good - but just means that something is answering on that port
|
||||
echo "publicTCPPortAnswering=1"
|
||||
|
@ -66,7 +69,10 @@ if [ "$1" = "status" ]; then
|
|||
echo "portSSL='50002'"
|
||||
localPortRunning=$(sudo netstat -an | grep -c '0.0.0.0:50002')
|
||||
echo "localHTTPPortActive=${localPortRunning}"
|
||||
publicPortRunning=$(nc -z -w6 ${publicip} 50002 2>/dev/null; echo $?)
|
||||
publicPortRunning=$(
|
||||
nc -z -w6 ${publicip} 50002 2>/dev/null
|
||||
echo $?
|
||||
)
|
||||
if [ "${publicPortRunning}" == "0" ]; then
|
||||
# OK looks good - but just means that something is answering on that port
|
||||
echo "publicHTTPPortAnswering=1"
|
||||
|
@ -194,9 +200,9 @@ Check 'sudo nginx -t' for a detailed error message.
|
|||
fi
|
||||
|
||||
# Options (available without TOR)
|
||||
OPTIONS=( \
|
||||
CONNECT "How to Connect" \
|
||||
REINDEX "Delete&Rebuild Index" \
|
||||
OPTIONS=(
|
||||
CONNECT "How to Connect"
|
||||
REINDEX "Delete&Rebuild Index"
|
||||
STATUS "ElectRS Status Info"
|
||||
)
|
||||
|
||||
|
@ -264,7 +270,7 @@ fi
|
|||
echo "# Making sure services are not running"
|
||||
sudo systemctl stop electrs 2>/dev/null
|
||||
|
||||
# uninstall
|
||||
# install
|
||||
if [ "$1" = "install" ]; then
|
||||
echo "# INSTALL ELECTRS"
|
||||
|
||||
|
@ -300,14 +306,7 @@ if [ "$1" = "install" ]; then
|
|||
|
||||
# build
|
||||
sudo -u electrs /home/electrs/.cargo/bin/cargo build --locked --release || exit 1
|
||||
|
||||
echo
|
||||
echo "# The electrs database will be built in /mnt/hdd/app-storage/electrs/db. Takes ~18 hours and ~50Gb diskspace"
|
||||
echo
|
||||
sudo mkdir /mnt/hdd/app-storage/electrs 2>/dev/null
|
||||
sudo chown -R electrs:electrs /mnt/hdd/app-storage/electrs
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
@ -315,6 +314,16 @@ fi
|
|||
if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
echo "# ACTIVATING ELECTRS"
|
||||
|
||||
# check and create storage dir
|
||||
if ! sudo ls /mnt/hdd/app-storage/electrs 2>/dev/null; then
|
||||
sudo mkdir /mnt/hdd/app-storage/electrs
|
||||
echo
|
||||
echo "# The electrs database will be built in /mnt/hdd/app-storage/electrs/db. Takes ~18 hours and ~50Gb diskspace"
|
||||
echo
|
||||
fi
|
||||
# always fix user id
|
||||
sudo chown -R electrs:electrs /mnt/hdd/app-storage/electrs
|
||||
|
||||
isInstalled=$(sudo ls /etc/systemd/system/electrs.service 2>/dev/null | grep -c 'electrs.service')
|
||||
if [ ${isInstalled} -eq 0 ]; then
|
||||
|
||||
|
@ -365,8 +374,7 @@ server_banner = \"Welcome to electrs $ELECTRSVERSION - the Electrum Rust Server
|
|||
echo
|
||||
echo "# Checking for config.toml"
|
||||
echo
|
||||
if [ ! -f "/home/electrs/.electrs/config.toml" ]
|
||||
then
|
||||
if [ ! -f "/home/electrs/.electrs/config.toml" ]; then
|
||||
echo "Failed to create config.toml"
|
||||
exit 1
|
||||
else
|
||||
|
|
Loading…
Add table
Reference in a new issue