mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-09 20:32:52 +02:00
use whitebind for electrs and btcpay
This commit is contained in:
@@ -85,6 +85,9 @@ if [ "$1" == "prestart" ]; then
|
|||||||
sed -i '/^test.datadir=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
sed -i '/^test.datadir=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||||
sed -i '/^signet.datadir=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
sed -i '/^signet.datadir=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||||
|
|
||||||
|
# remove any whitelist entries (whitebind is used instead)
|
||||||
|
sed -i '/^whitelist=/d' /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||||
|
|
||||||
# make sure bitcoin debug file exists
|
# make sure bitcoin debug file exists
|
||||||
echo "# make sure bitcoin debug file exists"
|
echo "# make sure bitcoin debug file exists"
|
||||||
touch ${bitcoinlog_path}
|
touch ${bitcoinlog_path}
|
||||||
|
@@ -59,6 +59,7 @@ function NBXplorerConfig() {
|
|||||||
sudo -u btcpay mkdir -p /home/btcpay/.nbxplorer/Main
|
sudo -u btcpay mkdir -p /home/btcpay/.nbxplorer/Main
|
||||||
echo "\
|
echo "\
|
||||||
network=mainnet
|
network=mainnet
|
||||||
|
btcnodeendpoint=127.0.0.1:8336
|
||||||
btc.rpc.user=${RPC_USER}
|
btc.rpc.user=${RPC_USER}
|
||||||
btc.rpc.password=${PASSWORD_B}
|
btc.rpc.password=${PASSWORD_B}
|
||||||
postgres=User ID=nbxplorer;Host=localhost;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorermainnet;Password='raspiblitz';
|
postgres=User ID=nbxplorer;Host=localhost;Port=5432;Application Name=nbxplorer;MaxPoolSize=20;Database=nbxplorermainnet;Password='raspiblitz';
|
||||||
@@ -670,9 +671,9 @@ WantedBy=multi-user.target
|
|||||||
|
|
||||||
NBXplorerConfig
|
NBXplorerConfig
|
||||||
|
|
||||||
# whitelist localhost in bitcoind
|
# whitelist connection in bitcoind
|
||||||
if ! sudo grep -Eq "^whitelist=127.0.0.1" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
|
if ! sudo grep -Eq "^whitebind=127.0.0.1:8336" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
|
||||||
echo "whitelist=127.0.0.1" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
echo "whitebind=127.0.0.1:8336" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||||
bitcoindRestart=yes
|
bitcoindRestart=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -376,6 +376,7 @@ index-batch-size = 10
|
|||||||
wait_duration_secs = 10
|
wait_duration_secs = 10
|
||||||
jsonrpc_timeout_secs = 15
|
jsonrpc_timeout_secs = 15
|
||||||
db_dir = \"/mnt/hdd/app-storage/electrs/db\"
|
db_dir = \"/mnt/hdd/app-storage/electrs/db\"
|
||||||
|
daemon_p2p_addr = \"127.0.0.1:8335\"
|
||||||
auth = \"${RPC_USER}:${PASSWORD_B}\"
|
auth = \"${RPC_USER}:${PASSWORD_B}\"
|
||||||
# allow BTC-RPC-explorer show tx-s for addresses with a history of more than 100
|
# allow BTC-RPC-explorer show tx-s for addresses with a history of more than 100
|
||||||
txid_limit = 1000
|
txid_limit = 1000
|
||||||
@@ -497,9 +498,9 @@ WantedBy=multi-user.target
|
|||||||
/home/admin/config.scripts/tor.onion-service.sh electrs 50002 50002 50001 50001
|
/home/admin/config.scripts/tor.onion-service.sh electrs 50002 50002 50001 50001
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# whitelist downloading to localhost from bitcoind
|
# whitelist connection in bitcoind
|
||||||
if ! sudo grep -Eq "^whitelist=download@127.0.0.1" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
|
if ! sudo grep -Eq "^whitebind=download@127.0.0.1:8335" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
|
||||||
echo "whitelist=download@127.0.0.1" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
echo "whitebind=download@127.0.0.1:8335" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||||
bitcoindRestart=yes
|
bitcoindRestart=yes
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user