Thunderhub fix and update (#2141)

This commit is contained in:
openoms
2021-04-08 00:30:22 +01:00
committed by GitHub
parent bf5223b058
commit bf3479a26d
2 changed files with 18 additions and 30 deletions

View File

@@ -13,7 +13,7 @@
- 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: 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: 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)

View File

@@ -1,6 +1,6 @@
#!/bin/bash
THUBVERSION="v0.12.7"
THUBVERSION="v0.12.12"
# command info
if [ $# -eq 0 ] || [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
@@ -82,7 +82,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# download and install
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
sudo -u thunderhub git reset --hard $THUBVERSION
echo "Running npm install and run build..."
@@ -119,8 +119,7 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
# Server Configs
# -----------
LOG_LEVEL='debug'
# HODL_KEY='HODL_HODL_API_KEY'
# BASE_PATH='/basePath'
TOR_PROXY_SERVER='socks://127.0.0.1:9050'
# -----------
# Interface Configs
@@ -131,12 +130,11 @@ CURRENCY='sat'
# -----------
# Privacy Configs
# -----------
FETCH_PRICES=false
FETCH_FEES=false
HODL_HODL=false
DISABLE_LINKS=true
NO_CLIENT_ACCOUNTS=true
NO_VERSION_CHECK=true
FETCH_PRICES = false
FETCH_FEES = false
DISABLE_LINKS = true
DISABLE_LNMARKETS = true
NO_VERSION_CHECK = true
# -----------
# Account Configs
@@ -205,21 +203,6 @@ EOF
# 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 "
# Systemd unit for thunderhub
@@ -232,8 +215,7 @@ After=lnd.service
[Service]
WorkingDirectory=/home/thunderhub/thunderhub
$env
ExecStart=$proxy /usr/bin/npm run start -- -p 3010
ExecStart=/usr/bin/npm run start -- -p 3010
User=thunderhub
Restart=always
TimeoutSec=120
@@ -245,7 +227,6 @@ StandardError=journal
WantedBy=multi-user.target
" | sudo tee /etc/systemd/system/thunderhub.service
sudo systemctl enable thunderhub
echo "OK - the ThunderHub service is now enabled"
# setting value in raspiblitz config
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
/home/admin/config.scripts/internet.hiddenservice.sh thunderhub 80 3012 443 3013
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
exit 0
fi
@@ -298,7 +286,7 @@ fi
# update
if [ "$1" = "update" ]; then
echo "# UPDATING THUNDERHUB"
cd /home/thunderhub/thunderhub
cd /home/thunderhub/thunderhub || exit 1
# from https://github.com/apotdevin/thunderhub/blob/master/scripts/updateToLatest.sh
# fetch latest master
sudo -u thunderhub git fetch