mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-27 20:16:22 +02:00
network flexible
This commit is contained in:
@@ -56,15 +56,16 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
||||
# install nodeJS
|
||||
/home/admin/config.scripts/bonus.nodejs.sh
|
||||
|
||||
# make sure that txindex of blockchain is switched on
|
||||
/home/admin/config.scripts/network.txindex.sh on
|
||||
|
||||
npm install -g btc-rpc-explorer@1.1.3
|
||||
|
||||
# prepare .env file
|
||||
echo "getting RPC credentials from the bitcoin.conf"
|
||||
echo "getting RPC credentials from the ${network}.conf"
|
||||
|
||||
RPC_USER=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcuser | cut -c 9-)
|
||||
PASSWORD_B=$(sudo cat /mnt/hdd/bitcoin/bitcoin.conf | grep rpcpassword | cut -c 13-)
|
||||
RPC_USER=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcuser | cut -c 9-)
|
||||
PASSWORD_B=$(sudo cat /mnt/hdd/${network}/${network}.conf | grep rpcpassword | cut -c 13-)
|
||||
|
||||
sudo -u bitcoin mkdir /home/bitcoin/.config/ 2>/dev/null
|
||||
touch /home/admin/btc-rpc-explorer.env
|
||||
@@ -80,7 +81,7 @@ BTCEXP_HOST=0.0.0.0
|
||||
# - [username/password]: none
|
||||
# - cookie: '~/.bitcoin/.cookie'
|
||||
# - timeout: 5000 (ms)
|
||||
BTCEXP_BITCOIND_URI=bitcoin://$RPC_USER:$PASSWORD_B@127.0.0.1:8332?timeout=10000
|
||||
BTCEXP_BITCOIND_URI=$network://$RPC_USER:$PASSWORD_B@127.0.0.1:8332?timeout=10000
|
||||
#BTCEXP_BITCOIND_HOST=127.0.0.1
|
||||
#BTCEXP_BITCOIND_PORT=8332
|
||||
BTCEXP_BITCOIND_USER=$RPC_USER
|
||||
@@ -114,8 +115,8 @@ EOF
|
||||
|
||||
[Unit]
|
||||
Description=btc-rpc-explorer
|
||||
Wants=bitcoind.service
|
||||
After=bitcoind.service
|
||||
Wants=${network}d.service
|
||||
After=${network}d.service
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/local/lib/nodejs/node-$(node -v)-$DISTRO/bin/btc-rpc-explorer
|
||||
|
Reference in New Issue
Block a user