mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-09-26 11:37:19 +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 '/^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
|
||||
echo "# make sure bitcoin debug file exists"
|
||||
touch ${bitcoinlog_path}
|
||||
|
@@ -59,6 +59,7 @@ function NBXplorerConfig() {
|
||||
sudo -u btcpay mkdir -p /home/btcpay/.nbxplorer/Main
|
||||
echo "\
|
||||
network=mainnet
|
||||
btcnodeendpoint=127.0.0.1:8336
|
||||
btc.rpc.user=${RPC_USER}
|
||||
btc.rpc.password=${PASSWORD_B}
|
||||
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
|
||||
|
||||
# whitelist localhost in bitcoind
|
||||
if ! sudo grep -Eq "^whitelist=127.0.0.1" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
|
||||
echo "whitelist=127.0.0.1" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||
# whitelist connection in bitcoind
|
||||
if ! sudo grep -Eq "^whitebind=127.0.0.1:8336" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
|
||||
echo "whitebind=127.0.0.1:8336" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||
bitcoindRestart=yes
|
||||
fi
|
||||
|
||||
|
@@ -376,6 +376,7 @@ index-batch-size = 10
|
||||
wait_duration_secs = 10
|
||||
jsonrpc_timeout_secs = 15
|
||||
db_dir = \"/mnt/hdd/app-storage/electrs/db\"
|
||||
daemon_p2p_addr = \"127.0.0.1:8335\"
|
||||
auth = \"${RPC_USER}:${PASSWORD_B}\"
|
||||
# allow BTC-RPC-explorer show tx-s for addresses with a history of more than 100
|
||||
txid_limit = 1000
|
||||
@@ -497,9 +498,9 @@ WantedBy=multi-user.target
|
||||
/home/admin/config.scripts/tor.onion-service.sh electrs 50002 50002 50001 50001
|
||||
fi
|
||||
|
||||
# whitelist downloading to localhost from bitcoind
|
||||
if ! sudo grep -Eq "^whitelist=download@127.0.0.1" /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
|
||||
# whitelist connection in bitcoind
|
||||
if ! sudo grep -Eq "^whitebind=download@127.0.0.1:8335" /mnt/hdd/app-data/bitcoin/bitcoin.conf; then
|
||||
echo "whitebind=download@127.0.0.1:8335" | sudo tee -a /mnt/hdd/app-data/bitcoin/bitcoin.conf
|
||||
bitcoindRestart=yes
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user