mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-01 15:07:21 +02:00
electrs: don't require restart after install #2548
This commit is contained in:
@@ -209,7 +209,7 @@ The index database needs to be created before Electrum Server can be used.\n
|
|||||||
This can take hours/days depending on your RaspiBlitz. Monitor the progress on the LCD.\n
|
This can take hours/days depending on your RaspiBlitz. Monitor the progress on the LCD.\n
|
||||||
When finished use the new 'ELECTRS' entry in Main Menu for more info.\n
|
When finished use the new 'ELECTRS' entry in Main Menu for more info.\n
|
||||||
" 14 50
|
" 14 50
|
||||||
needsReboot=1
|
needsReboot=0
|
||||||
else
|
else
|
||||||
l1="!!! FAIL on ElectRS install !!!"
|
l1="!!! FAIL on ElectRS install !!!"
|
||||||
l2="Try manual install on terminal after reboot with:"
|
l2="Try manual install on terminal after reboot with:"
|
||||||
|
@@ -289,11 +289,6 @@ if [ "$1" = "1" ] || [ "$1" = "on" ]; then
|
|||||||
sudo mkdir /mnt/hdd/app-storage/electrs 2>/dev/null
|
sudo mkdir /mnt/hdd/app-storage/electrs 2>/dev/null
|
||||||
sudo chown -R electrs:electrs /mnt/hdd/app-storage/electrs
|
sudo chown -R electrs:electrs /mnt/hdd/app-storage/electrs
|
||||||
|
|
||||||
# whitelist downloading to localhost from bitcoind
|
|
||||||
if ! sudo grep -Eq "^whitelist=download@127.0.0.1" /mnt/hdd/bitcoin/bitcoin.conf;then
|
|
||||||
echo "whitelist=download@127.0.0.1" | sudo tee -a /mnt/hdd/bitcoin/bitcoin.conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "# Getting RPC credentials from the bitcoin.conf"
|
echo "# Getting RPC credentials from the bitcoin.conf"
|
||||||
#read PASSWORD_B
|
#read PASSWORD_B
|
||||||
@@ -386,8 +381,6 @@ stream {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
sudo systemctl restart nginx
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo "# Open ports 50001 and 5002 on UFW "
|
echo "# Open ports 50001 and 5002 on UFW "
|
||||||
echo
|
echo
|
||||||
@@ -438,10 +431,24 @@ WantedBy=multi-user.target
|
|||||||
/home/admin/config.scripts/internet.hiddenservice.sh electrs 50002 50002 50001 50001
|
/home/admin/config.scripts/internet.hiddenservice.sh electrs 50002 50002 50001 50001
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
|
# whitelist downloading to localhost from bitcoind
|
||||||
if [ "${BTCRPCexplorer}" == "on" ]; then
|
if ! sudo grep -Eq "^whitelist=download@127.0.0.1" /mnt/hdd/bitcoin/bitcoin.conf;then
|
||||||
sudo systemctl restart btc-rpc-explorer
|
echo "whitelist=download@127.0.0.1" | sudo tee -a /mnt/hdd/bitcoin/bitcoin.conf
|
||||||
echo "# BTC-RPC-Explorer restarted"
|
bitcoindRestart=yes
|
||||||
|
fi
|
||||||
|
|
||||||
|
source /home/admin/raspiblitz.info
|
||||||
|
if [ "${state}" == "ready" ]; then
|
||||||
|
if [ "${bitcoindRestart}" == "yes" ]; then
|
||||||
|
sudo systemctl restart bitcoind
|
||||||
|
fi
|
||||||
|
sudo systemctl restart nginx
|
||||||
|
sudo systemctl start electrs
|
||||||
|
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
|
||||||
|
if [ "${BTCRPCexplorer}" == "on" ]; then
|
||||||
|
sudo systemctl restart btc-rpc-explorer
|
||||||
|
echo "# BTC-RPC-Explorer restarted"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo
|
echo
|
||||||
@@ -481,11 +488,11 @@ if [ "$1" = "0" ] || [ "$1" = "off" ]; then
|
|||||||
sudo ufw deny 50002
|
sudo ufw deny 50002
|
||||||
echo "# OK ElectRS removed."
|
echo "# OK ElectRS removed."
|
||||||
|
|
||||||
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
|
# restart BTC-RPC-Explorer to reconfigure itself to use electrs for address API
|
||||||
if [ "${BTCRPCexplorer}" == "on" ]; then
|
if [ "${BTCRPCexplorer}" == "on" ]; then
|
||||||
sudo systemctl restart btc-rpc-explorer
|
sudo systemctl restart btc-rpc-explorer
|
||||||
echo "# BTC-RPC-Explorer restarted"
|
echo "# BTC-RPC-Explorer restarted"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "# ElectRS is not installed."
|
echo "# ElectRS is not installed."
|
||||||
|
Reference in New Issue
Block a user