mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-28 04:26:28 +02:00
Thunderhub fix and update (#2141)
This commit is contained in:
@@ -13,7 +13,7 @@
|
|||||||
- Update: LND version 0.12.1-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.12.1-beta)
|
- Update: LND version 0.12.1-beta [details](https://github.com/lightningnetwork/lnd/releases/tag/v0.12.1-beta)
|
||||||
- Update: RTL 0.10.1 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.10.1)
|
- Update: RTL 0.10.1 [details](https://github.com/Ride-The-Lightning/RTL/releases/tag/v0.10.1)
|
||||||
- Update: Sphinx-Relay 2.0.3 (always latest release tag & improved connection dialog)
|
- Update: Sphinx-Relay 2.0.3 (always latest release tag & improved connection dialog)
|
||||||
- Update: Thunderhub 0.12.7 [details](https://github.com/apotdevin/thunderhub/blob/master/CHANGELOG.md#0124-2021-01-09)
|
- Update: Thunderhub 0.12.12 [details](https://github.com/apotdevin/thunderhub/releases/tag/v0.12.12)
|
||||||
- Update: Electrs 0.8.8 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#088-22-feb-2021)
|
- Update: Electrs 0.8.8 [details](https://github.com/romanz/electrs/blob/master/RELEASE-NOTES.md#088-22-feb-2021)
|
||||||
- Update: BTCPayServer 1.0.7.0 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.0.7.0)
|
- Update: BTCPayServer 1.0.7.0 [details](https://github.com/btcpayserver/btcpayserver/releases/tag/v1.0.7.0)
|
||||||
- Update: Specter Desktop 1.2.2 [details](https://github.com/cryptoadvance/specter-desktop/blob/master/README.md)
|
- Update: Specter Desktop 1.2.2 [details](https://github.com/cryptoadvance/specter-desktop/blob/master/README.md)
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
THUBVERSION="v0.12.7"
|
THUBVERSION="v0.12.12"
|
||||||
|
|
||||||
# command info
|
# command info
|
||||||
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
|
||||||
@@ -82,7 +82,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
|
|
||||||
# download and install
|
# download and install
|
||||||
sudo -u thunderhub git clone https://github.com/apotdevin/thunderhub.git /home/thunderhub/thunderhub
|
sudo -u thunderhub git clone https://github.com/apotdevin/thunderhub.git /home/thunderhub/thunderhub
|
||||||
cd /home/thunderhub/thunderhub
|
cd /home/thunderhub/thunderhub || exit 1
|
||||||
# https://github.com/apotdevin/thunderhub/releases
|
# https://github.com/apotdevin/thunderhub/releases
|
||||||
sudo -u thunderhub git reset --hard $THUBVERSION
|
sudo -u thunderhub git reset --hard $THUBVERSION
|
||||||
echo "Running npm install and run build..."
|
echo "Running npm install and run build..."
|
||||||
@@ -119,8 +119,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
# Server Configs
|
# Server Configs
|
||||||
# -----------
|
# -----------
|
||||||
LOG_LEVEL='debug'
|
LOG_LEVEL='debug'
|
||||||
# HODL_KEY='HODL_HODL_API_KEY'
|
TOR_PROXY_SERVER='socks://127.0.0.1:9050'
|
||||||
# BASE_PATH='/basePath'
|
|
||||||
|
|
||||||
# -----------
|
# -----------
|
||||||
# Interface Configs
|
# Interface Configs
|
||||||
@@ -133,9 +132,8 @@ CURRENCY='sat'
|
|||||||
# -----------
|
# -----------
|
||||||
FETCH_PRICES = false
|
FETCH_PRICES = false
|
||||||
FETCH_FEES = false
|
FETCH_FEES = false
|
||||||
HODL_HODL=false
|
|
||||||
DISABLE_LINKS = true
|
DISABLE_LINKS = true
|
||||||
NO_CLIENT_ACCOUNTS=true
|
DISABLE_LNMARKETS = true
|
||||||
NO_VERSION_CHECK = true
|
NO_VERSION_CHECK = true
|
||||||
|
|
||||||
# -----------
|
# -----------
|
||||||
@@ -205,21 +203,6 @@ EOF
|
|||||||
# SYSTEMD SERVICE
|
# SYSTEMD SERVICE
|
||||||
##################
|
##################
|
||||||
|
|
||||||
# torify service if Tor is used
|
|
||||||
if [ "${runBehindTor}" = "on" ]; then
|
|
||||||
echo "# Connect to the external APIs through Tor"
|
|
||||||
proxy="torify"
|
|
||||||
echo "# set up torsocks"
|
|
||||||
sudo cp /etc/tor/torsocks.conf /etc/tor/torsocks-thunderhub.conf
|
|
||||||
sudo sed -i "s/^#AllowInbound 1/AllowInbound 1/g" /etc/tor/torsocks-thunderhub.conf
|
|
||||||
sudo sed -i "s/^#AllowOutboundLocalhost 1/AllowOutboundLocalhost 1/g" /etc/tor/torsocks-thunderhub.conf
|
|
||||||
env="Environment=TORSOCKS_CONF_FILE=/etc/tor/torsocks-thunderhub.conf"
|
|
||||||
else
|
|
||||||
echo "# Connect to the external APIs through clearnet"
|
|
||||||
proxy=""
|
|
||||||
env=""
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "# Install ThunderHub systemd for ${network} on ${chain}"
|
echo "# Install ThunderHub systemd for ${network} on ${chain}"
|
||||||
echo "
|
echo "
|
||||||
# Systemd unit for thunderhub
|
# Systemd unit for thunderhub
|
||||||
@@ -232,8 +215,7 @@ After=lnd.service
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
WorkingDirectory=/home/thunderhub/thunderhub
|
WorkingDirectory=/home/thunderhub/thunderhub
|
||||||
$env
|
ExecStart=/usr/bin/npm run start -- -p 3010
|
||||||
ExecStart=$proxy /usr/bin/npm run start -- -p 3010
|
|
||||||
User=thunderhub
|
User=thunderhub
|
||||||
Restart=always
|
Restart=always
|
||||||
TimeoutSec=120
|
TimeoutSec=120
|
||||||
@@ -245,7 +227,6 @@ StandardError=journal
|
|||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
" | sudo tee /etc/systemd/system/thunderhub.service
|
" | sudo tee /etc/systemd/system/thunderhub.service
|
||||||
sudo systemctl enable thunderhub
|
sudo systemctl enable thunderhub
|
||||||
echo "OK - the ThunderHub service is now enabled"
|
|
||||||
|
|
||||||
# setting value in raspiblitz config
|
# setting value in raspiblitz config
|
||||||
sudo sed -i "s/^thunderhub=.*/thunderhub=on/g" /mnt/hdd/raspiblitz.conf
|
sudo sed -i "s/^thunderhub=.*/thunderhub=on/g" /mnt/hdd/raspiblitz.conf
|
||||||
@@ -255,6 +236,13 @@ WantedBy=multi-user.target
|
|||||||
# make sure to keep in sync with internet.tor.sh script
|
# make sure to keep in sync with internet.tor.sh script
|
||||||
/home/admin/config.scripts/internet.hiddenservice.sh thunderhub 80 3012 443 3013
|
/home/admin/config.scripts/internet.hiddenservice.sh thunderhub 80 3012 443 3013
|
||||||
fi
|
fi
|
||||||
|
source /home/admin/raspiblitz.info
|
||||||
|
if [ "${state}" == "ready" ]; then
|
||||||
|
echo "# OK - the thunderhub.service is enabled, system is ready so starting service"
|
||||||
|
sudo systemctl start thunderhub
|
||||||
|
else
|
||||||
|
echo "# OK - the thunderhub.service is enabled, to start manually use: 'sudo systemctl start thunderhub'"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -298,7 +286,7 @@ fi
|
|||||||
# update
|
# update
|
||||||
if [ "$1" = "update" ]; then
|
if [ "$1" = "update" ]; then
|
||||||
echo "# UPDATING THUNDERHUB"
|
echo "# UPDATING THUNDERHUB"
|
||||||
cd /home/thunderhub/thunderhub
|
cd /home/thunderhub/thunderhub || exit 1
|
||||||
# from https://github.com/apotdevin/thunderhub/blob/master/scripts/updateToLatest.sh
|
# from https://github.com/apotdevin/thunderhub/blob/master/scripts/updateToLatest.sh
|
||||||
# fetch latest master
|
# fetch latest master
|
||||||
sudo -u thunderhub git fetch
|
sudo -u thunderhub git fetch
|
||||||
|
Reference in New Issue
Block a user